roadmap: #273 filed

This commit is contained in:
Yeachan-Heo
2026-04-26 06:30:50 +00:00
committed by YeonGyu-Kim
parent c7d2c4e47f
commit b3af8bdb54

View File

@@ -17061,3 +17061,15 @@ Discovery-pattern continuation: founds the **Spec/contract-canonicalization-gap*
Required fix shape: (a) write a `TURN_BUDGET_SPEC.md` (or similar canonical-contract document under `docs/specs/`) that anchors `--max-turns 0` semantics to a referenced upstream precedent (Anthropic Claude Code's documented zero-turn behavior, with link), explicitly resolves the choice as semantic (3) `run-zero-iterations-fast-return`, and explicitly rejects semantics (1) and (2) with rationale; (b) define negative-value handling: `--max-turns -1` rejected at parse-time as `cli_parse` error (mirrors `--reasoning-effort yolo` typed-rejection precedent), with no alias semantics; (c) define unlimited-budget handling: introduce `--max-turns unlimited` as an explicit string sentinel OR document that no value means unlimited and unbounded loops require omitting the flag (avoid u32::MAX-as-sentinel which breaks downstream JSON consumers); (d) document the six-cell interaction matrix above with one paragraph per cell, each binding to a typed event/receipt: zero-turn run with `--allowedTools` validates the allow-list (cell i), records dangerous-permission flag in session-meta (cell ii), appends a typed `ZeroTurnInvocation` row to session.jsonl (cell iii), skips hook execution (cell iv) consistent with no-tool-call contract, emits `iterations: 0, assistant_messages: []` JSON envelope (cell v), and emits the `system_prompt` event so consumers can audit the would-have-been-sent prompt (cell vi); (e) replace `max_turns: u32` with `max_turns: TurnLimit` enum where `pub enum TurnLimit { Unlimited, ZeroFastReturn, Bounded(NonZeroU32) }` so the type system enforces the spec at compile-time and `0` cannot be confused with `unlimited` at any call site; (f) add tests for each interaction-matrix cell (i-vi) plus `TurnLimit::ZeroFastReturn` round-trip through `--output-format json`; (g) cross-reference the spec document from the `--max-turns` help text (#262 fix-shape (b) addition) and from the `TurnBudget` doc-comment (#264 fix-shape (a)) so future readers find canonical meaning before runtime behavior. Acceptance: `--max-turns 0` has exactly one documented behavior across CLI/runtime/JSON layers; the type system prevents semantics (1) and (2) from being silently introduced by a refactor; the six interaction cells each have a typed receipt; #262 and #264's fix-shapes can land knowing which `0` they are encoding; future zero-edge knobs (`--retries 0`, `--timeout 0`) have a canonicalization template to follow.
**Status:** Open. No source code changed. Filed 2026-04-26 15:04 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `29c262c` before filing (post-rebase fast-forward onto gaebal-gajae's #271 dogfood-repo-identity-guard pinpoint). Cluster delta: turn-budget cluster 2→3 (#262 parse-layer + #264 primitive-layer + #272 spec-layer = audit-triangle complete on a single user-facing flag); Spec/contract-canonicalization-gap sub-shape introduced (NEW sub-shape inside turn-budget cluster, portable to any sentinel-shaped numeric flag); complementary-pinpoint-pair-bundle discovery-pattern extended from 5 bundles to a first **three-tuple** (#262+#264+#272). Smaller-scope by design (matches #253-#271 context-budget discipline). Sister: #262 (parse-side; #262+#272 bracket the parse boundary's request-shape and meaning-shape gaps), #264 (primitive-side; #264+#272 bracket the runtime layer's type-shape and meaning-shape gaps), #266 (runtime-error-enum gap, parallel typed-meaning-axis but on errors not successes). Distinct from #271 (repo-identity guard at the dogfood layer; orthogonal to the turn-budget audit triangle). Distinct from silent-fallback family (catalogues silent input/output mutation; #272 catalogues missing canonical meaning at edge value). Concurrent-dogfood-rebase parity will be confirmed local==origin==fork at HEAD `29c262c+#272` after push.
## Pinpoint #273`claw status --output-format json` reports branch and dirty/clean state but omits HEAD SHA, upstream remote URL, ahead/behind counts, fetch timestamp, and source-of-truth repo identity, so machine consumers cannot detect stale/wrong-repo status from the product status surface itself
Dogfooded 2026-04-26 15:31 KST on `feat/jobdori-168c-emission-routing` at HEAD `ba6c5bc` (post-#272). Fresh `cargo run --quiet --bin claw -- --output-format json status` from `rust/` emits a useful workspace object (`cwd`, `project_root`, `git_branch`, `git_state`, changed/staged/unstaged/untracked counts, config/memory counts), but it omits the actual commit identity and provenance fields needed by dogfood automation: no `head_sha`, no `head_message`, no `head_timestamp`, no `upstream_branch`, no `upstream_remote_url`, no ahead/behind counts, no `last_fetch_at`, no canonical repo/source-of-truth slug, no `roadmap_last_pinpoint`, and no staleness marker. Text mode has the same gap: `Git branch feat/jobdori-168c-emission-routing` and `Git state clean`, but no commit/remotes/freshness.
Concrete failure mode: downstream claws can call the product-owned `claw status` surface and still cannot prove they are on the same HEAD as origin/fork, cannot distinguish `ultraworkers/claw-code` from a similarly named sibling repo, cannot detect that a local worktree is behind by one or more ROADMAP filings, and cannot cite the exact commit used for a dogfood report without shelling out to `git rev-parse`, `git remote -v`, `git rev-list --left-right --count`, and ROADMAP parsing. This is exactly the metadata that #259 (fresh status provenance) and #271 (repo identity guard) require, but it is missing from the canonical local status command that automation would naturally consume.
Gap. `claw status` is currently a local workspace cleanliness snapshot, not a provenance/freshness snapshot. That is fine for a human pre-commit check, but insufficient for recurring dogfood/status automation. This is distinct from #259, which requires dogfood status reports to include provenance; #273 identifies that the underlying product status surface does not provide those fields. It is distinct from #271, which requires repo-identity guards in dogfood generation; #273 identifies the missing repo identity fields in the product's JSON status. It is distinct from #269 transport delivery: #273 is pre-delivery status truth.
Required fix shape: (a) extend `claw status --output-format json` `workspace` with `git_head_sha`, `git_head_short`, `git_head_message`, `git_head_timestamp`, `upstream_branch`, `upstream_remote_name`, `upstream_remote_url`, `ahead`, `behind`, `last_fetch_at` (nullable), and `source_of_truth_repo` derived from the existing `OFFICIAL_REPO_URL`; (b) add optional `roadmap_last_pinpoint` / `roadmap_path` when `ROADMAP.md` exists at project root; (c) add `staleness_seconds` or `freshness_status` when upstream data is available, and `freshness_status: unknown_no_fetch` when it is not; (d) mirror the key fields in text mode compactly; (e) regression-test clean, ahead, behind, detached, no-upstream, and wrong-remote fixtures. Acceptance: a dogfood reporter can consume only `claw status --output-format json` plus ROADMAP content and refuse stale/wrong-repo reports without ad hoc git shelling.
**Status:** Open. No source code changed. Filed 2026-04-26 15:31 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `ba6c5bc` before filing. Cluster delta: product-status-provenance +1; sibling to #259 (report provenance) and #271 (repo identity guard), but distinct product status surface layer. Concrete delta this cycle: ROADMAP-only pinpoint appended after live `claw status` JSON/text verification.