Skip to content

Install a pinned native SpecGraph runtime for product workspaces - #813

Merged
SoundBlaster merged 15 commits into
mainfrom
feat/0231-native-runtime
Oct 27, 2026
Merged

SoundBlaster merged 15 commits into
mainfrom
feat/0231-native-runtime

Conversation

@SoundBlaster

@SoundBlaster SoundBlaster commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Install a stable, pinned full SpecGraph source snapshot and dedicated Python environment without coupling product work to the developer checkout. Proposal 0231 captures the user request, draft obligations and runtime evidence.

Motivation

Agents need to use the existing supervisor and SpecDraft in independent projects while SpecGraph development proceeds separately.

Goals

  • Install an exact Git commit into a new runtime directory without retaining engine Git history or overwriting an existing installation.
  • Route existing product initializer, advisor, supervisor and SpecDraft commands to an explicitly selected workspace; retain existing governance and executor boundaries.
  • ASP, Docker, package-index publication, cross-repository evidence binding, automatic upgrades and native Windows remain separate work.

Changes

  • Add a native snapshot installer, isolated Python environment and launcher; preserve the tracked source tree and verify selected installed files against Git objects.
  • Add the named RUNTIME_READY_SPEC for the completed, versioned installation receipt; forwarding, archive extraction and environment creation remain adapters/I/O mechanics. The receipt policy is not a source-tree integrity check.
  • Capture the actual conversation note, intake and proposal-lane link. Add four individually reviewed draft obligations; canonical publication and model refinement have not been performed.
  • Add GitHub CI for isolated installed-runtime smoke on Python 3.10/3.14.

Spec Evidence

Spec-ID: SG-SPEC-0007
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Preserve source attribution and supervisor authority while delivering a pinned independent runtime.
Intent-Decision-Review: tools/intent_decision_reviews/0231_native_runtime.json

Validation

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

Commands run:

.venv/bin/python -B -m pytest -q tests/test_native_runtime.py tests/test_product_workspace_next_moves.py tests/test_specdraft_distribution.py
make docc-sync proposal-tracking-gate materialization-packet-check spec-evidence-gate
make intent-decision-review SPEC_EVIDENCE_BASE_REF=26886fc22bf04d115429836dfce13f1e7efbfb29 INTENT_DECISION_REVIEW_ARGS='--pr-body-file <exact-pr-description>'
# Real installed snapshot: tests/native_runtime_smoke.py against two external synthetic projects.

Results:

  • 20 focused tests passed; source quality, DocC and proposal/evidence gates passed; actionlint 1.7.12 accepted the new workflow.
  • A real source snapshot and venv installed on macOS/Python 3.12.11 from commit ffcdcd9eb3a8465692e19aa4d9a12e7f322bc0bd; selected files matched Git objects. Both project workspaces initialized and ran the advisor, targeted supervisor dry-run and SpecDraft read. An injected deterministic executor ran a real Git worktree refinement: done, review_pending, no validation errors. No real model/provider was invoked. See docs/reviews/0231_native_runtime/verification.json.
  • Review regression: installation with --source . now resolves the caller checkout before Git changes directory; a real install of df773af49d92121b9261dd5369fe0868086e5569 and the two-workspace smoke passed. See docs/reviews/0231_native_runtime/relative-source-verification.json. URL and SSH syntax are covered by focused tests.
  • A repeat init after refinement was blocked by the existing .worktrees initializer limitation; the import-shadowing fixture adds a second expected unexpected entry. Separate existing proposal 0227 owns the workspace initialization boundary.

Risks / Notes

  • Backward compatibility impact: existing CLI facades and supervisor authority remain in place; launcher adds a separate routing surface.
  • Migration/config changes required: choose an explicit commit, installation directory and project workspace; install Git/Python, configure the existing executor as needed. The venv/launcher is not relocatable; reinstall at a new path.
  • Known limitations: the readiness Specification validates receipt fields, not the installed tree; source changes after verification are not detected. Installation needs network access for dependencies; real Codex and ASP integration are not verified; no canonical adoption is implied. Hosted CI/review 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

Spec-ID: SG-SPEC-0007
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Package a fixed source snapshot and route existing product commands without changing supervisor authority.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Verify snapshot installation, product isolation and supervisor worktree/review behavior using a deterministic executor.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Distinguish run records from other JSON artifacts in the installed-runtime probe.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Verify the snapshot contents against the selected source commit.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Prevent consumer modules and Python environment variables from shadowing the installed runtime.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Preserve installed source evidence, deterministic refinement outcome and the repeat-initialization blocker.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Record the exact source revision and distinguish workspace fixture entries in repeat-init diagnostics.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Require a versioned completed installation receipt and full source commit before launching an installed runtime.
Proposal-ID: 0231
Spec-Impact: docs-only
Spec-Rationale: Distinguish receipt readiness from verification of installed tree integrity.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Bind the installed runtime observation to the source containing its readiness policy.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Record individually reviewed implementation dispositions including the named readiness specification.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Keep decision evidence within the source reference size limit.
@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-27T19:26:02.448388Z baa871d 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: baa871d7d4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/native_runtime.py
Comment thread CONTRIBUTING.md
@github-actions

github-actions Bot commented Oct 27, 2026 •

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: 26886fc22bf0 → 12eada48424c
Profile: specgraph-intent-atoms-v1 (SHA-256 54caf075dafc)
Analyzer: 1.0.1 (SHA-256 aa7c646a25ea)

Proposal obligations · draft

Status: complete for declared fields
Count: 23 → 27 (+4)
Diff: +4 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.

@SoundBlaster

SoundBlaster commented Oct 27, 2026 •

Copy link
Copy Markdown
Member Author

HyperReview

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

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

--- before.hc
+++ after.hc
@@ -1 +1,4 @@
 SpecGraph
+  NativeRuntime
+    RuntimeReadiness
+    WorkspaceRouting

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

NativeRuntime:
  calls: "install → extract_snapshot; run → RUNTIME_READY_SPEC.is_satisfied_by; run → tools/product_workspace_next_moves.py; run → tools/supervisor.py"
  shared_contract: "RuntimeReadyFacts → native_runtime_ready_spec.py::RUNTIME_READY_SPEC"
Пояснения, источники и ограничения

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

PR добавляет документированный и реализованный поток установки закреплённого снимка SpecGraph: установщик извлекает архив, создаёт venv, записывает receipt, а launcher проверяет его готовность и направляет команды в явно выбранный workspace. README и DocC вводят пользовательскую точку входа и описывают границы изоляции. Отдельная документация уточняет ограничения и открытый дефект повторной инициализации после появления .worktrees; это описание, а не исправление поведения. В неизменённых файлах нет нового изменения логики подсчёта решений или режима Product Workspace. Установка не включает Git-историю, изменения рабочего дерева или данные проектов; ASP и каноническая публикация не заявлены.

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

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

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

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

Связь Что видно в источниках Основания
install → extract_snapshot После; интерпретация исходников; вызов операции. Функция install вызывает extract_snapshot(archive, snapshot) после создания Git-архива; направление подтверждается непосредственным вызовом. Проверяется только этот путь в предоставленном исходнике, а не фактическое выполнение установки. native_runtime.py: extract_snapshot L39–45, install L48–108
run → RUNTIME_READY_SPEC.is_satisfied_by После; интерпретация исходников; вызов операции. run строит RuntimeReadyFacts из полей runtime.json и непосредственно вызывает RUNTIME_READY_SPEC.is_satisfied_by(facts), прекращая запуск при ложном результате. Это проверка готовности receipt до выбора и выполнения команды; текущие байты снимка она не проверяет. native_runtime.py: run L127–127; native_runtime_ready_spec.py: RUNTIME_READY_SPEC L7–17; native_runtime_context.py: RuntimeReadyFacts L7–11
RuntimeReadyFacts → native_runtime_ready_spec.py::RUNTIME_READY_SPEC После; интерпретация исходников; общий контракт данных. Контекстный модуль объявляет поля фактов, спецификация принимает RuntimeReadyFacts, а run формирует этот объект из receipt и передаёт его проверке. Так подтверждены producer, consumer и общий контракт данных. native_runtime_context.py: RuntimeReadyFacts L7–11; native_runtime_ready_spec.py: RUNTIME_READY_SPEC L7–17; native_runtime.py: run L127–127
run → tools/supervisor.py После; интерпретация исходников; вызов операции. В ветках init и supervisor функция run формирует команду с путём source/tools/supervisor.py и запускает её через subprocess.run. Это вызов по указанному пути; реализация supervisor.py не дана, поэтому внутреннее делегирование не выводится. native_runtime.py: run L111–165
run → tools/product_workspace_next_moves.py После; интерпретация исходников; вызов операции. В ветке next-move функция run указывает source/tools/product_workspace_next_moves.py, передаёт --workspace-root и запускает сформированную команду через subprocess.run. Получатель получает выбранный workspace как аргумент; сам целевой инструмент в материалах не представлен. native_runtime.py: run L111–165

Связи в Hypercode (.hcs)

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

before.hcs

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

after.hcs

NativeRuntime:
  # После; интерпретация исходников; вызов операции. Функция install вызывает extract_snapshot(archive, snapshot) после создания Git-архива; направление подтверждается непосредственным вызовом. Проверяется только этот путь в предоставленном исходнике, а не фактическое выполнение установки.
  # Sources: src_4164d412555f182feb592c7ad725ee9c1e04b4163d5cb7f2644b3121014bad6e
  # После; интерпретация исходников; вызов операции. run строит RuntimeReadyFacts из полей runtime.json и непосредственно вызывает RUNTIME_READY_SPEC.is_satisfied_by(facts), прекращая запуск при ложном результате. Это проверка готовности receipt до выбора и выполнения команды; текущие байты снимка она не проверяет.
  # Sources: src_4164d412555f182feb592c7ad725ee9c1e04b4163d5cb7f2644b3121014bad6e, src_61740cd2d17cefa3b6a1169ba7a695c29159c746c2ac18746f99e3b91c46c656, src_b7a03e61853d46f60048ab02b70638003ca95aa6b894f333b9af1121b3ab2e44
  # После; интерпретация исходников; вызов операции. В ветке next-move функция run указывает source/tools/product_workspace_next_moves.py, передаёт --workspace-root и запускает сформированную команду через subprocess.run. Получатель получает выбранный workspace как аргумент; сам целевой инструмент в материалах не представлен.
  # Sources: src_4164d412555f182feb592c7ad725ee9c1e04b4163d5cb7f2644b3121014bad6e
  # После; интерпретация исходников; вызов операции. В ветках init и supervisor функция run формирует команду с путём source/tools/supervisor.py и запускает её через subprocess.run. Это вызов по указанному пути; реализация supervisor.py не дана, поэтому внутреннее делегирование не выводится.
  # Sources: src_4164d412555f182feb592c7ad725ee9c1e04b4163d5cb7f2644b3121014bad6e
  calls: "install → extract_snapshot; run → RUNTIME_READY_SPEC.is_satisfied_by; run → tools/product_workspace_next_moves.py; run → tools/supervisor.py"
  # После; интерпретация исходников; общий контракт данных. Контекстный модуль объявляет поля фактов, спецификация принимает RuntimeReadyFacts, а run формирует этот объект из receipt и передаёт его проверке. Так подтверждены producer, consumer и общий контракт данных.
  # Sources: src_b7a03e61853d46f60048ab02b70638003ca95aa6b894f333b9af1121b3ab2e44, src_61740cd2d17cefa3b6a1169ba7a695c29159c746c2ac18746f99e3b91c46c656, src_4164d412555f182feb592c7ad725ee9c1e04b4163d5cb7f2644b3121014bad6e
  shared_contract: "RuntimeReadyFacts → native_runtime_ready_spec.py::RUNTIME_READY_SPEC"

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

  • SpecGraph — До изменения продуктовый контекст включал SpecGraph как граф спецификаций; после добавлено описание отдельного runtime для работы с проектными workspace. Сохраняю SpecGraph как контекстный корень продуктового среза, а детализацию новой поставки отражаю ниже. Полная карта .hc не предоставлена, поэтому это выводимая композиция, а не переписанная авторская карта. README.md — до / после; docs/proposals/0231_native_specgraph_runtime.md — после

  • NativeRuntime — Новая документация и исполняемый установщик вводят обязанность доставить закреплённый снимок исходников и создать отдельную среду. Название NativeRuntime выведено из новой области ответственности: предоставленные материалы не содержат соответствующей карты .hc, а существующая карта документации SpecGraph описывает техническую документацию и не подходит как владелец runtime-поставки. Sources/SpecGraph/Documentation.docc/NativeRuntime.md — после; docs/proposals/0231_native_specgraph_runtime.md — после; tools/native_runtime.py — после

  • RuntimeReadiness — В новой реализации добавлена проверка готовности установленного runtime по объекту RuntimeReadyFacts и спецификации RUNTIME_READY_SPEC: вид артефакта, статус, версия схемы и полный SHA коммита проверяются до запуска операции. Это отдельная граница принятия решения внутри поставки, не проверка целостности текущего дерева файлов; существующие роли PredicateSpec или спецификаций из документации SpecGraph не описывают именно этот контракт готовности. tools/native_runtime_context.py — после; tools/native_runtime_ready_spec.py — после; tools/native_runtime.py — после

  • WorkspaceRouting — Новая документация уточняет, что установленная копия обслуживает явно выбранные workspace, а проектные Git-данные и runs остаются собственностью workspace. Код run строит команды для init, next-move, supervisor и draft с выбранным путём и cwd. Это граница маршрутизации операций; не переименовывает существующую ответственность SpecGraph за спецификации. Sources/SpecGraph/Documentation.docc/NativeRuntime.md — после; docs/proposals/0231_native_specgraph_runtime.md — после; tools/native_runtime.py — после

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

PR #813: 26886fc22bf04d115429836dfce13f1e7efbfb29 → 12eada48424c617560e0c08cd31203b8f0339f0f.

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

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

  • Конфигурация: .github/workflows/native-runtime.yml; after; охват partial; фрагментов 1. L1–10: configuration_context_omitted; L11–13: configuration_environment_redacted; L24–24: configuration_secret_line

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

  • Конфигурация: tools/intent_decision_reviews/0231_native_runtime.json; after; охват complete; фрагментов 1.

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

  • Вход содержит только изменённые записи и ограниченный контекст; пути с null в change_inventory скрыты, а отсутствие записи не позволяет определить их точные имена и содержимое. Полная область изменённых файлов по inventory известна, но часть соответствующих исходников в переданных фрагментах отсутствует.

  • Не предоставлены полные реализации supervisor.py, product_workspace_next_moves.py и модуля specgraph; поэтому маршруты launcher видны, но содержимое вызываемых инструментов и их поведение по этим вызовам не проверены.

  • tests/test_native_runtime.py и tests/native_runtime_smoke.py предоставлены и описывают проверки, однако их выполнение в этих данных не наблюдалось. Workflow указывает шаги и артефакт, но не подтверждает CI-запуск или результат.

  • Документация proposal ссылается на verification.json и pipeline.json, но эти точные целевые файлы не представлены; следовательно, документированные наблюдения нельзя независимо сверить по артефактам.

  • Часть workflow пропущена или скрыта, включая окружение и строку секрета; этот фрагмент не устанавливает полную конфигурацию workflow.

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

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

  • Пропущено: docs/experiments/ontology_decision_change.md — context_excerpted (до: 1).

  • Пропущено: docs/experiments/ontology_decision_counts.md — context_excerpted (до: 1).

  • Пропущено: docs/product_workspace_stable_mode_guide.md — context_excerpted (до: 1).

  • Пропущено: CONTRIBUTING.md — input_byte_limit (после: 1).

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

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

SpecGraph

NativeRuntime

  • Sources/SpecGraph/Documentation.docc/NativeRuntime.md — после: L1–3, L2–5

  • docs/proposals/0231_native_specgraph_runtime.md — после: L1–3, L9–12

  • tools/native_runtime.py — после: L1–195

RuntimeReadiness

  • tools/native_runtime_context.py — после: L7–11

  • tools/native_runtime_ready_spec.py — после: L7–17

  • tools/native_runtime.py — после: L127–127

WorkspaceRouting

Ок или не ок?

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

Снимок для 12eada48 · 2026-10-27T20:11:09Z (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
installed-wheel (3.10) completed success
installed-wheel (3.14) completed success
spec-evidence completed success
publication-diagnostic-compatibility (3.14) completed success
python-quality completed success
publication-diagnostic-compatibility (3.10) completed success
specdraft-preview-ui completed success
test in_progress —

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

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

Review gate: review thread.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

SpecificationMetrics · diagnostic PR measurement

Metric Base PR head (Δ)
Specifications (S) 125 126 (+1)
Remaining opportunities (U) 10303 10321 (+18)
S/U 0.0121324 0.0122081
Dead Specifications 0 0
Unknown Specifications 0 0

Collection: base complete, head complete.
Primary provisional: base False, head False.
Revisions: 26886fc22bf0 → 12eada48424c; contract 943b09cbbe20.
Base diagnostics: none reported.
Head diagnostics: none reported.

  • Python CC / Cog: cc_sum +34; cc_max +0; cog_sum +30; cog_max +0; sloc +187
  • 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.

Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Preserve relative local source semantics when fetching from an isolated temporary Git repository.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Retain the review root cause and source-bound installation verification.
Proposal-ID: 0231
Spec-Impact: tooling
Spec-Rationale: Bind the reviewed source changes and updated PR description to existing individual dispositions.
Comment thread CONTRIBUTING.md
@SoundBlaster
SoundBlaster merged commit 09565fe 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