Commit Graph
2 Commits
Author SHA1 Message Date
ddadmin fa61ae03ac fix(skill): pipe-форма и rollout-UUID fallback для переносимости
- Зачем:
  - форма `codex exec ... - < file` exit=1 с пустым stderr, а `--json` stdout оказывается пустым в части Claude Code песочниц; без обхода скилл не может захватить session ID и теряет resume на раундах 2-5.
- Что:
  - SKILL.md Step 4/7 переведены на `cat file | codex exec ... -` как canonical; добавлен two-tier захват session ID (primary = first JSONL line, secondary = UUID из имени `~/.codex/sessions/**/rollout-*.jsonl` с mtime > CODEX_SESSIONS_BEFORE).
  - README.md обновлены permissions (pipe-форма, `find rollout-*`, `date +%s`) и добавлен troubleshooting про env-specific пустой JSONL.
  - docs/DESIGN.md: §2.1 описывает обе формы, §2.2 фиксирует env-specific suppression, §2.3 добавляет filesystem-recovery путь, §4.1 переделан на two-tier decision, добавлены §4.13 (canonical pipe) и §6.6 (lesson от 2026-04-17), в §8 новая строка с окружением yantar-k8s.
- Проверка:
  - DESIGN.md §7.1 smoke test (обновлён на pipe-форму + проверка filesystem secondary path).
  - Оба окружения (reference WSL2 + containerized sandbox) должны давать валидный session ID и успешный resume.
2026-04-17 17:09:29 +03:00
ddadminandClaude Opus 4.7 3f0d1321ff docs: add DESIGN.md explaining why the skill is built this way
1082-line design note covering:
- Empirical facts about Codex CLI 0.121.0 (invocation, streams,
  resume semantics, known failure modes) with copy-pasteable
  verification commands.
- Claude Code harness facts (Bash truncation, cwd drift, Opus
  literal-interpretation tendencies).
- 12 design decisions in a uniform format: what, where in SKILL.md,
  alternatives considered, why chosen, trade-offs accepted.
- Rejected ideas (marker files, per-round naming, $(pwd), etc.) with
  reasons, so future contributors don't re-propose them.
- Prior diagnostic errors from a previous agent-auditor's dump that
  turned out to be wrong when verified, kept as a methodological
  lesson.
- Smoke-test protocol (§7) with concrete commands and expected
  outputs so any maintainer can verify the Codex contract still holds
  in minutes.
- Update protocol: when and how to revise this file, with a pointer
  that future Opus generations interpret instructions more literally
  and SKILL.md hardening must track that.
- Mermaid flow diagram of the round-trip.

Intended audiences: future Claude sessions resuming work on the skill,
human developers, and new contributors. The file is self-contained —
does not rely on conversation history that produced the current design.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 14:29:16 +03:00