Skip to content

spec: cover the rebase-merge modules and re-verify what it staled - #106

Merged
tzhouam merged 1 commit into
mainfrom
ci/spec-coverage-freshness
Aug 25, 2026
Merged

spec: cover the rebase-merge modules and re-verify what it staled#106
tzhouam merged 1 commit into
mainfrom
ci/spec-coverage-freshness

Conversation

@tzhouam

@tzhouam tzhouam commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

What

Restores check_spec_freshness --strict to CLEAN (67 pages — 0 stale, 0 undeclared,
0 orphan, 0 uncovered) without weakening the gate. Main has been red since the rebase-merge
lineage landed: 13 stale pages, 38 uncovered modules, and 3 pages orphaned by today's v1/v2
cutover — every open PR (#100#105) inherits that failure.

New coverage (8 pages). Package pages use the checker's own SPEC/<pkg>.md mapping
(precedent: engine/steps/pr.md):

  • rebase_engine.md — the 26-module v3 engine package (per-module map; C4 push
    double-gate + WAL trichotomy with cited lines; checkout-lock hygiene shield; token-only
    header transport; wheel venv targeting)
  • testing.md — the test-execution substrate (hw-gate explicit skips; layered timeouts;
    PID-reuse-safe tree kills; GPU-lock ownership rules; two-tier watchdog + append-only
    learning; allowlist credential scrub)
  • engine/steps/rebase_v3.md (12-step table with published state_updates keys),
    engine/steps/rebase_knowledge.md, engine/lifecycle.md, ci/buildkite.md,
    memory/curator.md, memory/paths.md

13 stale pages re-verified against their sources' diffs — content amended where the
contracts actually moved, not marker-bumped: _common (K3/K4/K7 helpers landed),
tools (extra-tool write_path_arg opt-in scoping, audit_ok), adapters/base
(HIGH_RISK_SECTIONS+rebase, expand_path fallback, AdapterNotFound), executor
(durable checkpoint), config (v3 knobs, expansion_env secret filter, PR4d fail-closed
cutover), agent_runtime (runtime-first skill scoping), debug_memory (schema v2),
skills (durable candidates, usage journal), mcp_server (lock-loser reconcile), cli
(migrate-knowledge, mode write-back, knowledge run-lock), chat, steps/__init__ (45
steps), PLAYBOOKS (marker only — the cutover already rewrote its content).

Deleted the 3 orphaned pages of deleted modules (rebase_ext, rebase_native,
rebase/monitor) and fixed every roster that still named them: SPEC README index,
CODE_TOUR's rebase branch, and GUIDE §6's full step inventory (38→45 with the real
per-kind counts and the v3 step tables).

Recorded, not silently fixed: agent_loop.py/rebase_tools.py docstrings call the tool
choke point "C5" where _CONSTRAINTS.md numbers it C3 — flagged in
rebase_engine.md's refactor notes for a comment-only follow-up.

Verification

  • tools/check_spec_freshness.py --strict — CLEAN (was: 13 stale / 38 uncovered / 3 orphan)
  • tools/check_doc_links.py (300 files) and check_doc_citations.py — OK
  • Full offline suite — green (docs-only change)
  • Every stated invariant carries source-line evidence gathered during drafting; spot-checks
    on the highest-stakes claims (push WAL, hw-gate, curator schema guard, migration marker)
    re-read the cited lines directly.

Unblocks CI for #100#105.

🤖 Generated with Claude Code

https://claude.ai/code/session_0165QsXAeLVPrKfj8Yk5zns3

Main has been red on `check_spec_freshness --strict` since the rebase-merge
lineage landed: 13 pages stale, 38 modules uncovered, 3 pages orphaned by
the v1/v2 cutover. This restores the gate to CLEAN (67 pages — 0 stale,
0 undeclared, 0 orphan, 0 uncovered) without weakening it.

New coverage (8 pages; package pages per the SPEC/<pkg>.md mapping rule,
precedent engine/steps/pr.md):
- rebase_engine.md — the 26-module v3 engine package: per-module map,
  C4 push double-gate + WAL trichotomy, checkout-lock hygiene shield,
  mode/gate adjudication, token-in-header transport, wheel venv targeting
- testing.md — the test-execution substrate package: hw-gate explicit
  skips, layered timeouts, PID-reuse-safe tree kills, GPU lock ownership,
  watchdog two-tier adjudication + append-only learning, credential scrub
- engine/steps/rebase_v3.md (12-step table with published state keys),
  engine/steps/rebase_knowledge.md, engine/lifecycle.md, ci/buildkite.md,
  memory/curator.md, memory/paths.md

Re-verified 13 stale pages against their sources' actual diffs — content
amended where contracts moved, not just markers: _common (K3/K4/K7 helpers
landed; debug-memory writes via KnowledgePaths), tools (extra-tool
write_path_arg scoping opt-in, audit_ok classifier), adapters/base
(HIGH_RISK_SECTIONS +rebase, expand_path extra fallback, AdapterNotFound),
executor (durable checkpoint), config (v3 rebase knobs, expansion_env
secret filter, PR4d fail-closed cutover, neutralized high_risk_modules),
agent_runtime (runtime-first three-tier skill scoping, journal-side seed
usage), debug_memory (schema v2 explicit-upgrade-only, readonly URI,
curation), skills (durable candidates, usage-journal primitives),
mcp_server (lock-loser reconcile signature), cli (migrate-knowledge,
mode write-back, shared knowledge run-lock), chat, steps/__init__ (45
steps), PLAYBOOKS (marker only — the cutover already rewrote the content).

Deleted the 3 orphaned pages of deleted modules (rebase_ext,
rebase_native, rebase/monitor) and fixed the stale rosters that named
them (SPEC README index, CODE_TOUR rebase branch, GUIDE step counts
38→45 with real per-kind numbers).

Known docstring drift recorded, not silently fixed: agent_loop.py and
rebase_tools.py call the tool choke point "C5" where _CONSTRAINTS.md
numbers it C3 — noted in rebase_engine.md's refactor notes.

Gates: check_spec_freshness --strict CLEAN, check_doc_links (300 files),
check_doc_citations, full offline suite — all green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0165QsXAeLVPrKfj8Yk5zns3
@tzhouam
tzhouam merged commit 9c8b636 into main Aug 25, 2026
1 of 2 checks passed

@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: 183bc74a68

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

| 规划数据 | `playbooks/store` `playbooks/PLAYBOOKS`(yaml) |
| 边缘 —— 语言 | `profiles/languages`(按语言的规则,共享) |
| 边缘 | `adapters/base` `ci/normalize` `ci/providers` `rebase/monitor` |
| 边缘 | `adapters/base` `ci/normalize` `ci/providers` `ci/buildkite` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add every new specification to the file index

Keep this supposedly complete mirror index synchronized with the pages introduced by this commit. It still omits engine/lifecycle.md, rebase_engine.md, testing.md, memory/curator.md, and memory/paths.md, so contributors following the README before modifying those source modules cannot discover their new contracts from the declared index.

Useful? React with 👍 / 👎.


<!-- verified-against: 2026-08-25 -->

`LOC ~7500(26 个模块) · repo-rebase-v3 的原生 rebase 引擎 · refactor-status: ok`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include wheel.py in the module map

Correct the module count and add wheel.py to the per-module table. The reviewed tree contains 27 Python modules in rebase_engine/, including wheel.py, while this page claims 26 and maps only the other 26; this leaves wheel selection, installation, and pinning without the responsibility entry promised by the page's “逐模块图”.

Useful? React with 👍 / 👎.

Comment thread doc/GUIDE.md
| `rebase.phase2_prepare` | read | 预检 curator + phase-2 进度初始化 |
| `rebase.phase2_finalize` | read | 两个 wave 完成后推进父标记 |
| `workspace.guard_clean_rebase` | write_workspace | rebase 专用脏树守卫(adapter 策略委托) |
| `rebase.v3_prelude` | read | 模式解析写回、substate/锁/终局 finalizer、知识开账 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Attribute mode write-back to the CLI gate

Describe this step as validating the resolved mode and publishing its flags rather than resolving and writing it back. _v3_prelude only reads params.rebase_mode and returns BLOCKED when it is absent or unknown; rebase_engine.modes is invoked by the CLI before the playbook to perform authoritative resolution and write-back, so the current row assigns a safety-critical responsibility to the wrong component.

Useful? React with 👍 / 👎.

@tzhouam
tzhouam deleted the ci/spec-coverage-freshness branch August 25, 2026 07:34
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