Skip to content

Close worktree lifecycle and retain recovery review points - #807

Merged
SoundBlaster merged 1 commit into
mainfrom
codex/worktree-lifecycle
Oct 27, 2026
Merged

SoundBlaster merged 1 commit into
mainfrom
codex/worktree-lifecycle

Conversation

@SoundBlaster

Copy link
Copy Markdown
Member

Summary

  • Add a portable worktree-lifecycle skill and require its closeout guidance in the repository's agent/contributor instructions.
  • Document the content audit and preserved review points from the local worktree recovery.

Motivation

Old execution directories outlived their task and review records. A live ignored SpecDraft notebook also depended on a temporary worktree, while the primary checkout stayed on an older branch.

Goals

  • Give each task worktree an explicit active/handoff, published or archived disposition.
  • Preserve local data and still-relevant candidates without treating archival as canonical acceptance.
  • No new cleanup daemon, registry, CI gate or canonical policy.

Changes

  • A self-contained skill covers reuse, squash/rebase proof, staged/untracked/ignored data, persistent consumers, verified archival and sequential retirement.
  • Agent instructions, contribution guidance and a synchronized DocC article link the skill.
  • The recovery walkthrough distinguishes already-retained results, superseded refinements and unadopted alternatives.
  • WTR-0021 retains the unpublished Specification Verifiability clarification for review against proposal 0226. WTR-0043 and WTR-0063 have context-specific revisit triggers.
  • The skill was also installed locally for use across projects. Private notebooks, raw patches and recovery archives are not included.

Spec Evidence

Spec-ID: NO-SPEC-IMPACT
Proposal-ID: 0048
Spec-Impact: docs-only
Spec-Rationale: Engineering lifecycle guidance preserves the existing salvage review boundary from proposal 0048. Canonical YAML, runtime code, authority and evidence admission remain unchanged.

Validation

  • Tests added/updated for changed behavior
  • Local checks passed

Commands run:

python /path/to/skill-creator/scripts/quick_validate.py .codex/skills/worktree-lifecycle
make docc-sync materialization-packet-check PYTHON=.venv/bin/python
git diff --cached --check

Results:

  • Both repository and installed skill copies validated; their contents match.
  • DocC sync passed. The existing materialization packet remains consistent and review_pending; publication is not authorized.
  • All 17 remaining auxiliary worktrees received content-verified archives, including ignored data; nested trees were archived separately and retired before parents. Branches were preserved.
  • The notebook's 50 files and 16 history entries matched after migration to the primary checkout. Fresh-process CLI recovery and restoration from the full archive both passed.
  • The SG-SPEC-0021 candidate was restored from its archive and matched the original. Its explicit-ID salvage remains review-first; no model run or canonical adoption occurred.
  • The merged Add ontology owner decision contract #548 test difference has identical top-level AST nodes; only test order changed.
  • No automated runtime test suite repeated: no runtime/test code changed.

Risks / Notes

  • Backward compatibility impact: none to runtime or public artifact schemas.
  • Migration/config changes required: the local notebook and preview now use the primary checkout; local handoff records carry the new location.
  • Known limitations: the skill guides agents; it does not enforce producer cleanup automatically. The salvage builder's generic default run ID was recorded as a separate runtime issue; this recovery used an explicit unique ID. CI/review are pending.

Checklist

  • PR title clearly describes the change
  • Scope is focused and minimal
  • Documentation updated (or N/A)
  • Workflow/artifact changes distinguish presence from readiness/status
  • Consumers prefer authoritative repaired/promoted/latest artifacts where relevant
  • Temporary or intermediate paths are scoped to the current run/task where relevant
  • No secrets or sensitive data added

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T21:58:21.517201Z b6dcce7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread CONTRIBUTING.md
@SoundBlaster

Copy link
Copy Markdown
Member Author

HyperReview

Эскиз по исходникам · b6dcce71

Состав · изменения в проекции

--- before.hc
+++ after.hc
@@ -1 +1,2 @@
 SpecGraphEngineeringPractice
+  WorktreeLifecycleGuidance

Выбранные связи · после

SpecGraphEngineeringPractice:
  requires: "Worktree lifecycle guidance → DocC synchronization contract: tools/docc_sync_contract.json"
Пояснения, источники и ограничения

Суть изменения

Изменённый CONTRIBUTING.md добавляет инструкцию применять существующий worktree-lifecycle skill до создания дерева и при его закрытии; добавлены обычная документация и DocC-страница с процедурами closeout и восстановления и с описанием локальных находок. Текст явно сохраняет границу: архивирование и salvage не одобряют канонические изменения и не вводят runtime policy или новый CI gate. Существующая обязанность синхронизировать публичную техническую документацию с DocC стала применима к новому руководству; показанные тесты и metric/style-инструменты имеют одинаковые полные blob на обеих сторонах и не являются кодом этого изменения.

Интерпретация выбранных исходников; порядок узлов не означает порядок выполнения.

− и + показывают удаление и добавление в соответствующей ветке проекции; смена родителя тоже выделена, даже если строка узла не изменилась.

Связи и основания

Связи описаны отдельно от вложенности .hc; основания — в правой колонке.

Связь Что видно в источниках Основания
Worktree lifecycle guidance → DocC synchronization contract: tools/docc_sync_contract.json После; заявлено в источниках; обязательство границы. CONTRIBUTING.md объявляет tools/docc_sync_contract.json контрактом синхронизации обычной документации и DocC, перечисляющим группы, страницы и обязательные anchors; это документированная обязанность для добавленных страниц, а не свидетельство успешной проверки. CONTRIBUTING.md: DocC L437–440, DocC L439–442, DocC L442–445, docc_sync_contract.json L445–448

Связи в Hypercode (.hcs)

Это неполные выборки связей из каждой версии. Отсутствие связи в одной из выборок не устанавливает её добавление или удаление. Пустой лист означает, что связи для этой версии не выбраны.

before.hcs

# Paired review context; no relationship recorded on this side.

after.hcs

SpecGraphEngineeringPractice:
  # После; заявлено в источниках; обязательство границы. CONTRIBUTING.md объявляет tools/docc_sync_contract.json контрактом синхронизации обычной документации и DocC, перечисляющим группы, страницы и обязательные anchors; это документированная обязанность для добавленных страниц, а не свидетельство успешной проверки.
  # Sources: src_601991b9416e167417071525edf5b540e22a1ae9a305415781fd7b6ed9b09db4
  requires: "Worktree lifecycle guidance → DocC synchronization contract: tools/docc_sync_contract.json"

Ответственности и источники

  • SpecGraphEngineeringPractice — В before CONTRIBUTING.md уже задаёт инженерную практику через границы инструментов, артефактов и проверок. В after добавлены правила жизненного цикла worktree: повторное использование, фиксация задачи и точного head, проверка игнорируемых данных и сохранение перед удалением. Код не меняет работу над графом; это уточнение операторской процедуры. В документации сказано, что skill не вводит runtime policy, канонический переход, approval boundary или CI gate. CONTRIBUTING.md — до / после

  • WorktreeLifecycleGuidance — Новая обычная документация и её DocC-страница описывают процедуру закрытия и восстановления worktree: сопоставление кандидатов с текущим состоянием, сохранение нужного содержимого, раздельное архивирование вложенных деревьев и возврат к отложенной проверке WTR-0021. Это документированная операционная граница, не новая реализация механизма. Отдельно пояснено, что наблюдённое закрытие архива не утверждает канонические изменения, а восстановление не было новым запуском executor. Sources/SpecGraph/Documentation.docc/WorktreeLifecycle.md — после; docs/worktree_lifecycle.md — после

Границы анализа

PR #807: 8e1a261b021ecc6c50b9d352f11a1543340f8988 → b6dcce719cf9b861366b95c03cf3a90fbb394dbd.

Исходников в анализе: 10; пропущено: 18.

Компилятор проверил структуру Hypercode и ссылки. Соответствие интерпретации коду и поведение программы этим не доказаны. Анализ ограничен предоставленными исходниками и фрагментами контекста; выполнение программы не наблюдалось.

Неизменённых файлов контекста по Git blob: 3. Их фрагменты до и после могут различаться охватом.

  • Три изменённых пути в change_inventory имеют null-пути, поэтому их содержимое не предоставлено; нельзя определить их точные роли или изменения. Полный inventory отмечен complete, но эти изменённые материалы остаются скрытыми.

  • Не предоставлены исходные before-версии новых worktree-документов и сам portable skill, поэтому сравнение их прежнего содержания и точных шагов skill невозможно.

  • docs/worktree_lifecycle.md описывает локальные наблюдения и манифест, но сами архивы, манифест, исходные кандидаты и сохранённые патчи не включены; эти утверждения нельзя независимо проверить по переданным фрагментам.

  • tools/docc_sync_contract.json и результат проверки docc-sync не предоставлены. CONTRIBUTING.md описывает anchor-based контракт и gate, но выполнение проверки и синхронность страниц не подтверждены.

  • Документация называет существующий salvage path и CLI, однако tools/supervisor.py исключён по input_byte_limit; его реализацию и wiring нельзя проверить. Запусков и runtime-наблюдений в материалах нет.

  • Пропущено: docs/intent_atoms.md — input_byte_limit (после: 1, до: 1).

  • Пропущено: docs/intent_decision_review.md — input_byte_limit (после: 1, до: 1).

  • Пропущено: docs/publication_policy_diagnostics.md — input_byte_limit (после: 1, до: 1).

  • Пропущено: docs/registered_rule_reuse.md — input_byte_limit (после: 1, до: 1).

  • Пропущено: tests/test_intent_decision_review.py — context_excerpted (после: 1, до: 1).

  • Пропущено: tools/supervisor.py — input_byte_limit (после: 1, до: 1).

  • Пропущено: tools/validate_architecture_style.py — context_excerpted (после: 1, до: 1).

  • Пропущено: tools/architecture_metrics.py — context_excerpted (до: 1).

  • Пропущено: путь скрыт политикой — operator_file (после: 2); unsupported_format (после: 1).

Точные диапазоны источников по узлам

SpecGraphEngineeringPractice

WorktreeLifecycleGuidance

Ок или не ок?

CI · результаты проверок

Снимок для b6dcce71 · 2026-10-26T22:01:14Z (UTC).

Результат check-run не доказывает выполнение конкретного теста, полноту покрытия или соответствие архитектуре.

Проверка Статус Результат
Deploy landing page to static host completed skipped
Deploy bundle to static host completed skipped
deploy completed skipped
Prepare case-sensitive redirect artifact completed skipped
Build static artifact bundle completed success
publication-diagnostic-compatibility (3.14) completed success
python-quality completed success
Build DocC technical surface completed success
spec-evidence completed success
publication-diagnostic-compatibility (3.10) completed success
registered-rule-reuse completed success
specdraft-preview-ui completed success

Снимок неполный: показано не более 12 проверок.

Отсутствие, ожидание или сбой CI не блокируют архитектурный обзор.

Review gate: review thread.

@github-actions

Copy link
Copy Markdown

Intent Atoms · v1

Scope: specification YAML in specs/nodes

Status: complete
Count: 302 → 302 (+0)
Diff: +0 added, −0 removed, 0 modified
Revisions: 8e1a261b021e → b6dcce719cf9
Profile: specgraph-intent-atoms-v1 (SHA-256 54caf075dafc)
Analyzer: 1.0.1 (SHA-256 aa7c646a25ea)

Proposal obligations · draft

Status: complete for declared fields
Count: 12 → 12 (+0)
Diff: +0 added, −0 removed, 0 modified
Coverage: explicit YAML declarations in docs/proposals; unannotated Markdown is not assessed.
Draft counts are separate from specification counts; they do not establish review, approval or canonical promotion.

Informational only; this report does not gate merge readiness.

@github-actions

Copy link
Copy Markdown

SpecificationMetrics · diagnostic PR measurement

Metric Base PR head (Δ)
Specifications (S) 125 125 (+0)
Remaining opportunities (U) 10294 10294 (+0)
S/U 0.012143 0.012143
Dead Specifications 0 0
Unknown Specifications 0 0

Collection: base complete, head complete.
Primary provisional: base False, head False.
Revisions: 8e1a261b021e → b6dcce719cf9; contract 943b09cbbe20.
Base diagnostics: none reported.
Head diagnostics: none reported.

  • Python CC / Cog: cc_sum +0; cc_max +0; cog_sum +0; cog_max +0; sloc +0
  • Clone pairs / duplicate lines / tokens: clone_pairs +0; duplicate_lines +0; duplicate_tokens +0

Scope: files assigned application by the manifest; tests/ is test, and the comment renderer is framework.
Informational only. Counts and metrics do not decide eligibility, correctness, or merge readiness.
Collection run
Detailed JSON reports and counting contract
Artifact presence does not imply a complete measurement; inspect report statuses and diagnostics. Downloads require GitHub access and expire with artifact retention.

@SoundBlaster
SoundBlaster merged commit 4303eda into main Oct 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant