feat(cc-060): extract codex-dispatch timeout default + model alias SoT#131
Merged
Conversation
Implements both axes from docs/spikes/CC-060.md §2.5 (Q1=B bundled, Q2=A
introduces ~/.pm-dispatch/config user-config file).
Axis 1 — timeout:
- scripts/codex-dispatch.sh: _load_config_timeout() helper. Precedence:
brief field > CODEX_DISPATCH_TIMEOUT env > ~/.pm-dispatch/config
[dispatch.default_timeout] > 1200 fallback (1200 preserved as floor).
- Parser ignores blanks/comments/unknown keys, warns on malformed lines
or non-integer dispatch.default_timeout, and captures
dispatch.default_model as a reserved key (no consumer yet).
- docs/dispatch-brief.md: new "Env / config precedence" subsection +
example ~/.pm-dispatch/config; CODEX_DISPATCH_TIMEOUT promoted to
documented public env.
- scripts/test-codex-dispatch.sh: 3 new fixtures (env-only, config-only,
brief-field beats both).
Axis 2 — model alias SoT:
- share/model-aliases.tsv: new SoT (codex-spark -> gpt-5.3-codex-spark /
high), tab-separated with header comment + schema.
- scripts/codex-dispatch.sh: declare -A MODEL_ALIAS_TO_{ID,EFFORT} maps
removed; runtime _resolve_model_alias() reads from TSV with fail-loud
semantics if missing/unreadable/malformed. Snapshot copy preserved so
re-execed snapshot still reads the SoT.
- docs/dispatch-brief.md: aliases section now references the TSV and
cites scripts/lint-model-aliases.sh as the drift check (replaces the
prior "must keep in sync" warning).
- scripts/lint-model-aliases.sh: new lint asserting TSV parse + doc
table byte-equivalence + alias coverage in tests + dispatcher uses
the runtime loader path.
- .github/workflows/lint.yml: wires lint-model-aliases.sh into the
lint-scripts job.
- README.md: dispatch script paragraph documents ~/.pm-dispatch/config
as optional, user-managed, never installer-created; current supported
keys + reserved dispatch.default_model.
Local self-verify: lint-scripts OK, test-codex-dispatch 19/19,
test-dispatch-handover 65/65, test-hooks 306/306, lint-model-aliases
exit 0, validate.sh BACKLOG.md emits 31 E-* (= pre-existing CC-228
baseline). shellcheck not present in env; CI will run it.
Brief asked for axis-split commits; squashed here because codex sandbox
had no git write access, and reviewer = audience-of-one (per
[[project_japanese-site_audience]]-style override; pm-dispatch is solo).
PR description carries the rationale.
Refs CC-060, CC-242.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- scripts/lint-model-aliases.sh:23: cleanup() is invoked indirectly via
`trap cleanup EXIT`. shellcheck SC2329 ("function never invoked")
doesn't recognize trap callers. Add an inline `# shellcheck disable`
comment with the reason. CI test-skill-refine job was failing on this
warning; local lint passed because shellcheck wasn't installed locally
(exactly the [[feedback_ci_shellcheck_stricter_than_local]] scenario).
- BACKLOG.md:141: CC-060 was still marked ⏸ deferred from before the
spike; with PR #131 in flight implementing the bundled timeout +
model SoT extraction, flip status to 🔵 active and update Refs to
pr:#131. Priority bumped to P2 and epic set to design to match the
scope. The brief that produced commit b360d21 told PM "keep original
status/date columns unchanged" — that was my mistake; status should
have flipped together with the description rewrite.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
3 tasks
screenleon
added a commit
that referenced
this pull request
May 23, 2026
CC-243 shipped the snapshot script + PM agent's ingestion-rule but no caller invoked the script — it was shelf-ware in main. This wires `commands/pm.md` (the canonical /pm entry point) to: 1. Run `scripts/pm-prep-snapshot.sh` from the target repo's working directory before invoking the project-pm agent. 2. Parse any `CC-\d+` IDs from $ARGUMENTS and pass them as --focus. 3. Inject `snapshot_file: <abs-path>` into the PM brief context. 4. Degrade gracefully if the script errors (e.g. target repo has no BACKLOG.md — common when /pm is invoked from japanese-site or another non-pm-dispatch repo); skip the snapshot but proceed with the dispatch. PM's `## Snapshot ingestion` section (added in CC-243 to `agents/project-pm.md`) already treats `snapshot_file` as ground truth, preferring it over caller-brief prose for commit SHAs / ticket IDs. This commit closes the loop. Local verify: validate.sh BACKLOG.md emits 30 E-* lines (one below the CC-228 baseline of 31, carried over from the CC-060 #131 ref-cleanup). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
screenleon
added a commit
that referenced
this pull request
May 23, 2026
…tate (#143) Closes 4 in-flight rows whose work shipped 2026-05-23 but status was not flipped; aligns MILESTONES.md M0 table with the actual shipped state; clears the CC-219 freshness gate's blocking findings. Closed (status + body): - CC-241 v0.2.0 doc-drift cleanup — closed on inspection (a/b/c already fixed before audit; no edit required, row closed by status flip) - CC-219 pre-milestone doc-freshness gate — shipped via #129 - CC-060 codex-dispatch param extraction — shipped via #131 - CC-243 pm-prep-snapshot — shipped via #132 Fixed pr:TBD on closed rows (per CC-219 gate U3): - CC-243 → pr:#132 - CC-246 → pr:#134 MILESTONES.md v0.3.0 M0 table — flipped all 6 rows from ⏳ to ✅ with merged-PR refs; added "✅ complete 2026-05-23" header to the M0 section. CC-229..CC-232 (M1) remain ⏳ and are the next gate. Validator parity preserved at 30 pre-existing E-codes (CC-228 baseline). `scripts/check-docs-freshness.sh` blocking findings cleared (1 WARN remains: CC-249 pr:TBD, expected — spike-pending). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements both axes from
docs/spikes/CC-060.md§2.5 (Q1=B bundled, Q2=A introduces~/.pm-dispatch/configuser-config file — first user-config precedent in the repo)._load_config_timeout()helper inscripts/codex-dispatch.sh. Precedence chain: brief field >CODEX_DISPATCH_TIMEOUTenv >~/.pm-dispatch/configdispatch.default_timeout>1200fallback (1200 preserved as floor). Parser is shell-source-ablekey=value, ignores blanks/comments/unknown keys, warns on malformed lines, capturesdispatch.default_modelas a reserved key.share/model-aliases.tsvbecomes the single source of truth for PM-alias → wire-format model + reasoning effort.declare -Amaps removed fromcodex-dispatch.sh; runtime_resolve_model_alias()reads from TSV with fail-loud semantics. Newscripts/lint-model-aliases.shenforces drift detection (TSV ↔ doc table ↔ template references ↔ test coverage), wired into thelint-scriptsCI job.docs/dispatch-brief.mdaliases section now cites the lint instead of the prior manual sync warning.~/.pm-dispatch/configas optional, user-managed, never installer-created. Current keys =dispatch.default_timeout+ reserveddispatch.default_model.Refs CC-060 (epic), CC-242 (spike ticket — already registered in BACKLOG.md with spike doc at
docs/spikes/CC-060.md).PR shape note
Brief asked for axis-split commits; squashed here because codex sandbox lacked git write access and reviewer = audience-of-one (pm-dispatch is solo per project posture). The squash includes all axis-1 + axis-2 + shared doc/CI edits as one commit on top of the spike + backlog commits.
Gate findings (evaluated, not tracked)
/pr-gate(full tier) returnedGOwith verdictadvise. Two[low]findings from qa-tester were evaluated and not followed up:_resolve_model_alias) still fail-loud on bad TSV. Skipped.dispatch.default_timeoutboundary fixtures — parser behavior implemented (warn + fall-through to env/1200); worst case is unexpected-but-safe timeout. Skipped.Both findings have near-zero real risk; documented here in lieu of a tracked backlog ticket so future-me has the trail.
Test plan
bash scripts/lint-scripts.sh— 50 files OKbash scripts/test-codex-dispatch.sh— 19/19 (3 new axis-1 fixtures pass)bash scripts/test-dispatch-handover.sh— 65/65bash scripts/test-hooks.sh— 306/306bash scripts/lint-model-aliases.sh— exit 0bash pm/scripts/validate.sh BACKLOG.md— 31E-*(== pre-existing CC-228 baseline, no regression)shellcheck --severity=style— not installed locally; CI will run it🤖 Generated with Claude Code