Skip to content

fix(dev): reject unknown spec statuses before writes (Z2-SPEC-STATUS) - #767

Merged
mergify[bot] merged 2 commits into
mainfrom
codex/z2-spec-status
Oct 9, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
codex/z2-spec-status

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Unbekannte Statuswerte werden beim Abschließen einer Spec jetzt abgewiesen.
Dadurch bleiben bei Tippfehlern sowohl die Spec als auch das Register in STAND unverändert.
Du musst nichts tun; das unabhängige Review veranlasst Root.

Report

Package: Z2-SPEC-STATUS · Review tier: B
Goal / benefit: Reject unknown spec statuses before any Spec/STAND write.
Parent / ticket / owner: Serverreserve 3 / Z2; ticket 77c993f3; srv-z2-spec-status.
Authority: Root item 5, dispatched by Chief; contract at PLAN commit 36241d17181ce8cd4e7bc0c02e4ef1803f820043 (pending #749 at start).
Native evidence: get_goal returned goal: null; create_goal returned status: active with the bounded implementation, validation, verified push and draft handover objective. Milestone get_goal retained that objective and active status. Parent acceptance remains with Root.
Base: a8f00322b510dd48df67cc50ad0650b879902e40
Candidate: 8ba6f2737442f42f018f3752346e5d94b83e28f9
Scope: Only the two dispatched files; 29 additions / 0 deletions, below 180 ALL. No seam, gate, shared-helper or dependency changes.

What changed

  • Pin the existing scripts/lib/active-specs.mjs:7 contract (aktiv, historisch, entwurf) in spec-close and refuse all other values with exit 3 before any write or HQ invocation.
  • Add the exact requested regression at scripts/lib/dev-spec-close.test.mjs:71, using temporary fixtures and an injected runner. Cover aktvi, historic, Aktiv, and unknown, both dry-run and --apply --hq; assert unchanged file bytes, error text, exit code, and zero runner calls.
  • Preserve all existing cases, including allowed statuses, suffix rejection, CRLF, dry-run, and historical replay.

Evidence

Observed 2026-10-09, Linux, Node v24.21.0 (node --version, exit 0). Every command completed in the foreground.

Command Exit code / observation
git rev-parse HEAD before edits 0; exact required base
npm run dev:start-check 0; initial 13.0 GB free, 0 cargo builds; provider quota unavailable
node --test --test-name-pattern='SPEC-STATUS: unknown status refuses without write' scripts/lib/dev-spec-close.test.mjs before fix 1; compiling regression on unchanged base source: aktvi: spec unchanged failed because the file became historical; test committed first as c09c6aff469ba11450eec5d8fea578766a997e9d
Same named command after fix 0; 1 passed
node --test scripts/lib/dev-spec-close.test.mjs 0; 14 passed
bash scripts/ci/red-first.sh 0; named case missing on merge-base and green at candidate; direct failing test above proves the defect
bash scripts/ci/secret-scan.sh before each commit 0; no leaks
bash scripts/ci/gates.sh lane prepush in the assigned worktree and Cargo slot 0; 22 gates green, 209 seconds; 1892 Rust tests passed, 7 skipped
git push -u origin codex/z2-spec-status 0; hook also completed full prepush, 22 gates green
git ls-remote origin codex/z2-spec-status 0; 8ba6f2737442f42f018f3752346e5d94b83e28f9
git diff --numstat origin/main...HEAD 0; source +2, test +27
git status --short 0; clean

NICHT ABGEDECKT

  • Linux only: no Windows run. #[cfg(windows)] tests (including ConPTY/DPAPI) and Windows clippy branches are not covered; Windows lane runs in the merge queue.
  • Browser smoke, frontend build and workflow gates belong to the separate Linux lane; external service state is not verified by these gates.
  • No live Spec/STAND/HQ write in the new regression: only temporary fixtures and an injected runner.
  • Provider quota and exact served model were not exposed by this harness; OpenAI author family is known from dispatch, no specific served model is asserted. AgentsRoom memory/tool and local lage-jetzt mirror were unavailable; live Git/PR sources were read instead.

Reviews and disposition

Review: pending, Root dispatches (Tier B: one reviewer outside OpenAI). No independent review performed by this worker; no review findings received.

Open points / handover

Implemented, locally tested, pushed and remote SHA verified. Draft handover only; not independently reviewed, accepted or merged. Root owns candidate-bound external review, acceptance and subsequent queue integration. No implementation blocker or scope adaptation.

Root-Abnahme (09.10.2026, head 8ba6f27)

ID Source Severity Finding Disposition
R767-A1 Anthropic (claude-sonnet-5-5, server) info/nit scripts/dev/spec-close.mjs:18 ALLOWED_STATUSES duplicates ERLAUBT from active-specs.mjs:7 Follow-up (not blocking; file outside the exclusive pair)
R767-A2 Anthropic info fixture assertion in dev-spec-close.test.mjs:71 is meaningful No action

Tier B: author Codex gpt-6-astra (OpenAI); reviewer Anthropic family, verdict approve bound to head 8ba6f27. Report: ~/pa-orch/reports/review-pr767-anthropic-r1-8ba6f27.md.

Test-First: scripts/lib/dev-spec-close.test.mjs::SPEC-STATUS: unknown status refuses without write
Test-First: scripts/lib/dev-spec-close.test.mjs::SPEC-STATUS: unknown status refuses without write
@Cuarroc
Cuarroc marked this pull request as ready for review October 9, 2026 00:01
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-09T00:02:52.113890Z 8ba6f27 Draft marked ready
ℹ️ 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.

@mergify mergify Bot added the queued label Oct 9, 2026
@mergify
mergify Bot merged commit 3ef0b8f into main Oct 9, 2026
17 checks passed
@mergify

mergify Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 24 minutes 31 seconds in the queue, including 13 minutes 2 seconds running CI.

Required conditions to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant