Skip to content

Preserve supervisor worktrees on workspace reinitialization - #814

Merged
SoundBlaster merged 1 commit into
mainfrom
fix/workspace-init-after-supervisor
Oct 27, 2026
Merged

SoundBlaster merged 1 commit into
mainfrom
fix/workspace-init-after-supervisor

Conversation

@SoundBlaster

Copy link
Copy Markdown
Member

Summary

  • Preserve the Supervisor .worktrees/ directory when reinitializing a product workspace.
  • Related proposal: 0227.

Motivation

A successful refinement leaves .worktrees/, which previously made subsequent init report an unexpected entry.

Goals

  • Allow repeat initialization without deleting Supervisor state.
  • Keep setup helpers, outer-project binding and real-agent validation out of scope.

Changes

  • Allow an existing ordinary .worktrees/ directory; reject files and symlinks, including dangling symlinks.
  • Exercise repeat initialization after an actual Git-worktree refinement in the installed-runtime smoke test.

Spec Evidence

Spec-ID:
Proposal-ID: 0227
Spec-Impact: behavior
Spec-Rationale: Realizes the narrow initializer correction documented by proposal 0227. Entry recognition and filesystem type validation are I/O boundary checks, not new reusable domain policies. No intent atoms changed.

Intent-Decision-Review:

Validation

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

Commands run:

.venv/bin/python -B -m pytest -q tests/test_supervisor.py -k initialize_product_workspace
.venv/bin/python -B tests/native_runtime_smoke.py --repo <checkout> --revision 37708ca04d23d8423cd269e56313c85ae3fb27a2 --root <TB5 directory> --output <TB5 report>
make docc-sync proposal-tracking-gate intent-decision-review

Results:

  • 13 focused tests passed; installed snapshot smoke passed on two synthetic workspaces, including repeated init after a Git-worktree refinement.
  • DocC sync, proposal tracking, Ruff and intent decision review passed (0 changed atoms). The executor is a deterministic fixture, not a real agent.

Risks / Notes

  • Backward compatibility impact: .worktrees files and symlinks are blocked; normal directories are preserved.
  • Migration/config changes required: none.
  • Known limitations: specs/nodes remains separately created; no real-agent or outer-project evidence binding is claimed.

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 27, 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-27T20:50:08.395707Z 37708ca 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

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

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

NativeRuntime
Пояснения, источники и ограничения

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

Изменение уточняет описанный контракт установленного Native SpecGraph runtime: initializer не создаёт `specs/nodes`; после исполнения Supervisor допустим существующий обычный `.worktrees` с сохранением содержимого, а файл или symlink там отклоняется. Код tools/native_runtime.py в предоставленных фрагментах побайтно одинаков, поэтому документальное уточнение не следует трактовать как изменение реализации. Сохраняются границы установленного снимка и отдельно выбранной рабочей области.

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

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

Связи не сформированы: Полезную связь между initializer, Supervisor и ограничением `.worktrees` нельзя обосновать предоставленным кодом: изменённые tools/supervisor.py и tests/test_supervisor.py отсутствуют, а доступный tools/native_runtime.py не содержит соответствующей реализации. Документация объясняет ожидаемое условие, но не связывает конкретные операции вызовом; связи не добавлены.

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

  • NativeRuntime — До и после сохраняется ответственность за установленный runtime: в документации NativeRuntime уточнено, что initializer не создаёт `specs/nodes`, после запуска Supervisor принимает существующий каталог `.worktrees`, сохраняя его содержимое, и отвергает файл или symlink на этом пути. Это уточнение документации; оно не доказывает выполнение. Поскольку .hc/.hcs не переданы, роль выведена из описанного продуктового контракта. Sources/SpecGraph/Documentation.docc/NativeRuntime.md — до / после

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

PR #814: 09565fe401ad9f5629b2fc8f37170586fafb7d57 → 37708ca04d23d8423cd269e56313c85ae3fb27a2.

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

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

  • Конфигурация: pyproject.toml; after / before; охват complete; фрагментов 1.

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

  • Фрагменты tools/native_runtime.py до и после идентичны и заканчиваются внутри install(); реализации initializer и проверки `.worktrees` в них нет. Содержимое tools/supervisor.py и tests/test_supervisor.py отмечено изменённым, но не предоставлено; нельзя сопоставить документальное уточнение с изменённым кодом или проверить покрытие.

  • Proposal 0227, Proposal 0231 и ProductWorkspacePilots.md указаны как изменённые, но их содержимое не предоставлено из-за input_byte_limit. CONTRIBUTING.md лишь добавляет формулировку о приёме обычного `.worktrees` после Supervisor, но не заменяет недоступные документы и реализацию.

  • tests/native_runtime_smoke.py после содержит дополнительную проверку повторного init после refinement: статус ready, пустые validation_findings, неизменность `.worktrees`, конфигурации и root intent; это описание проверок, а не наблюдение их выполнения. Результаты запуска и внешняя CI-проверка не предоставлены.

  • Полные .hc/.hcs отсутствуют, поэтому роль NativeRuntime выведена из документации; соответствие авторской карте, реализация, фактическое поведение и прохождение проверок не подтверждены.

  • Связи не сформированы: Полезную связь между initializer, Supervisor и ограничением `.worktrees` нельзя обосновать предоставленным кодом: изменённые tools/supervisor.py и tests/test_supervisor.py отсутствуют, а доступный tools/native_runtime.py не содержит соответствующей реализации. Документация объясняет ожидаемое условие, но не связывает конкретные операции вызовом; связи не добавлены.

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

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

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

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

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

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

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

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

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

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

  • Пропущено: Sources/SpecGraph/Documentation.docc/ProductWorkspacePilots.md — input_byte_limit (после: 1).

  • Пропущено: docs/proposals/0227_git_isolated_local_workspace.md — input_byte_limit (после: 1).

  • Пропущено: docs/proposals/0231_native_specgraph_runtime.md — input_byte_limit (после: 1).

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

NativeRuntime

  • Sources/SpecGraph/Documentation.docc/NativeRuntime.md — до: L1–33; после: L1–35

Ок или не ок?

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

Снимок для 37708ca0 · 2026-10-27T20:52:28Z (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
publication-diagnostic-compatibility (3.10) completed success
python-quality completed success
Build DocC technical surface completed success
specdraft-preview-ui completed success
spec-evidence completed success
registered-rule-reuse 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: 09565fe401ad → 37708ca04d23
Profile: specgraph-intent-atoms-v1 (SHA-256 54caf075dafc)
Analyzer: 1.0.1 (SHA-256 aa7c646a25ea)

Proposal obligations · draft

Status: complete for declared fields
Count: 27 → 27 (+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) 126 126 (+0)
Remaining opportunities (U) 10321 10322 (+1)
S/U 0.0122081 0.0122069
Dead Specifications 0 0
Unknown Specifications 0 0

Collection: base complete, head complete.
Primary provisional: base False, head False.
Revisions: 09565fe401ad → 37708ca04d23; contract 943b09cbbe20.
Base diagnostics: none reported.
Head diagnostics: none reported.

  • Python CC / Cog: cc_sum +3; cc_max +0; cog_sum +3; cog_max +0; sloc +12
  • 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 538271c into main Oct 27, 2026
18 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