Skip to content

docs(parallel-issues): document merge-plan input shape and name validator field failures - #409

Merged
thewrz merged 3 commits into
mainfrom
feat/issue-400
Aug 23, 2026
Merged

docs(parallel-issues): document merge-plan input shape and name validator field failures#409
thewrz merged 3 commits into
mainfrom
feat/issue-400

Conversation

@thewrz

@thewrz thewrz commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

This was written agentically; verify its assertions:

Why

write-merge-plan.sh requires generatedAt (and a specific independent/chains record shape) in its merge-plan input, but triage-and-selection.md only showed generatedAt on the schema-2 output. The first real handoff on 2026-08-22 failed with the generic merge plan is malformed, ambiguous, or does not match dispatch entries and cost a source read. Closes #400.

What

Documents the exact merge-plan input JSON and its field rules in triage-and-selection.md, and adds a diagnostic pass to write-merge-plan.sh that names the first failing field (e.g. merge plan is invalid: merge plan is missing required field: generatedAt). The boolean accept/reject gate is byte-for-byte unchanged; the diagnostic runs only on its failure path and falls back to the old message.

Decisions

  • Diagnostic layered beside the existing gate rather than replacing it, so a diagnostic bug can never loosen validation.
  • The documented example was round-tripped through the real script (the first draft reused issue 164 in both sections and the validator correctly rejected it — fixed before commit).
    base=origin/main
    files=3
    total.insertions=135
    total.deletions=5
    total.lines=140
    operational.files=3
    operational.insertions=135
    operational.deletions=5
    operational.lines=140
    generated.files=0
    generated.insertions=0
    generated.deletions=0
    generated.lines=0
    lockfile.files=0
    lockfile.insertions=0
    lockfile.deletions=0
    lockfile.lines=0
    fixture.files=0
    fixture.insertions=0
    fixture.deletions=0
    fixture.lines=0
    non_operational.files=0
    non_operational.insertions=0
    non_operational.deletions=0
    non_operational.lines=0

Testing

  • New regression: missing generatedAt → rc=1 and stderr names the field
  • Focused write-merge-plan suite 10/10; full suite green (agent-run.sh --cmd test, worktree log 20260822T220041Z-test.log)
  • CI green

🤖 Co-authored by Claude Fable 5 (root) / claude-sonnet-5 (worker).

Closes #400

…ator field failures

write-merge-plan.sh validated generatedAt/independent/chains as required input fields, but triage-and-selection.md only ever showed the resulting schema-2 *output*, so the first real ready-flip attempt hit the generic "malformed, ambiguous" error and cost a source read to diagnose. Document the exact input JSON and field rules, and make the validator name the first field that failed instead of a blanket message -- the accept/reject decision is unchanged, this only adds a diagnostic second pass on the existing rejection path.

Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b2af7132-462d-4ac5-b898-0ee2fcfc985b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

…alling back silently

record_issue called `keys` before checking the record was an object, so a syntactically-valid-but-wrong merge plan (e.g. `"independent":[null]`) made jq itself error out inside the diagnostic pass; the error was swallowed (stderr suppressed, `|| true` guard), reason stayed empty, and the generic fallback message printed -- contradicting the doc promise that the first failing field is always named. Add a type=="object" guard as the first check in record_issue so non-object records (null, string, number, array) are named directly, and cover it with a regression test.

Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com>
@thewrz

thewrz commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Adversarial review receipt

  • Reviewer: provider=openai; model=gpt-5.6-terra; effort=xhigh; mode=cross-provider (reason: peer-cli=codex present)
  • Counts: P1=0; P2=1; total=1
  • Confirmed finding: diagnostic pass crashed on non-object merge-plan records — verdict=fixed; fix commit SHA(s)=ee7321708e9a67c1477a2e29e84fa9e2c7098a96

🤖 Co-authored by Claude Fable 5 (root).

@thewrz
thewrz marked this pull request as ready for review August 23, 2026 01:52
@thewrz
thewrz merged commit ad191af into main Aug 23, 2026
4 checks passed
@thewrz
thewrz deleted the feat/issue-400 branch August 26, 2026 03:41
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.

docs(parallel-issues): write-merge-plan.sh requires generatedAt in its *input*; triage-and-selection.md documents it only on the output

1 participant