Skip to content

fix(intake-triage): build the re-entry eval schema from the reusable's schema step - #17673

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/issue-17667-reentry-eval-schema
Nov 20, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/issue-17667-reentry-eval-schema

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #17667

Summary

The intake re-entry eval's suite builder failed against ci-workflows main. It read outputs["schema-file"] from the reusable's compose step, and since ci-workflows febb1ed (ci-workflows#1128) compose no longer sets that output. A separate schema step now runs check-intake-triage-verdict's verdict.cjs in schema mode. That step writes the schema with the caller's verdict-schema fields, and it also appends those field names to the prompt file.

Fix

  • build-suite.mjs takes --verdict <verdict.cjs> from the same ci-workflows commit as the reusable. After the compose script runs, it calls that module's main in schema mode on compose's allowed, type-names and prompt-file outputs and the caller's verdict-schema. It reads the prompt only after that call, so the appended field lines reach the case.
  • It fails closed when a compose leg has no schema step that runs mode: schema on ${{ inputs.verdict-schema }}, when the step writes no schema file, or when the caller's verdict-schema is not one single-quoted line.
  • run.sh extracts verdict.cjs at the pinned sha and passes it to the builder. The README describes the schema step.
  • build-suite.test.mjs checks this with a stub verdict.cjs whose schema is a hand-written literal. It covers the schema read from the new source, the prompt read after the append, failure when no schema file is written, the schema-step check, and how the quoted verdict-schema is parsed.

Verification

  • node --test .github/scripts/intake-triage/reentry-eval/build-suite.test.mjs: 9 of 9 pass. Two mutants go red: reading the schema from compose's schema-file fails 2 tests, and reading the prompt before the schema step fails "the prompt is read after the schema step appends to it".
  • Reproduced the bug: main's builder against ci-workflows main (f784359) throws TypeError [ERR_INVALID_ARG_TYPE] at build-suite.mjs:161.
  • This branch's builder against ci-workflows main builds all 9 cases, with and without --no-instructions. Every case gets a non-empty schema.
  • Unchanged prompts. The baseline is main's builder against 73f81cb, the last reusable before febb1ed.
    • With verdict-schema removed from the caller, this branch's build of all 9 cases is byte-identical to the baseline (diff -r of evals/).

    • With the caller's real verdict-schema, which is what the lane sends today, each prompt keeps the baseline prompt as an exact prefix. The base schema properties are unchanged. The only additions are the block below, the same in all 9 cases, and the five typed properties size, complexity, uncertainty, flags and blocked_by, added to the schema and to required:

      Also return these fields in the structured output; the output schema bounds each one:
      - size (required)
      - complexity (required)
      - uncertainty (required)
      - flags (required)
      - blocked_by (required)
      

      Those lines come from the reusable's own schema step, not from the builder.

  • ci(intake-triage): move inline prompts to files and record why reusables track main #17664's rubric and new case, built in a scratch directory outside the branch: all 10 cases build with and without instructions, and the rubric appears verbatim in every with prompt. validate-cases.py reports nothing and exits 0 on both suites. A negative control with swapped samples fails it, as expected.
  • shellcheck run.sh, markdownlint-cli2 on the README, and scripts/check-changelog-fragments.sh --check-required origin/main are clean. No fragment is needed: no plugin's shipped files change.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj

…s schema step

Since ci-workflows febb1ed (#1128) the compose step no longer sets
schema-file; a separate schema step runs check-intake-triage-verdict's
verdict.cjs in schema mode, which writes the schema and appends the
caller's verdict-schema fields to the prompt. The suite builder read
outputs["schema-file"] from compose and failed on readFileSync(undefined).

build-suite.mjs now takes --verdict <verdict.cjs> from the same commit,
runs its main in schema mode on the compose outputs and the caller's
verdict-schema, reads the prompt after that step, and fails closed when
a compose leg has no schema step or the step writes no schema file.
run.sh extracts verdict.cjs at the pinned sha and passes it.

Closes #17667

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T16:56:05.014127Z bc8d6e9 PR opened
ℹ️ 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.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed bc8d6e96f2e6d95102a30f184ef1df5f7b0f0ade: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17673 (bc8d6e9)

I found no security issues.

What changed. The intake re-entry eval's suite builder (.github/scripts/intake-triage/reentry-eval/) used to read the schema from compose's schema-file output, which no longer exists. It now builds the schema from the reusable's new schema step. run.sh pulls verdict.cjs out of the pinned ci-workflows commit with git show. build-suite.mjs writes that file into a temp dir, loads it with require, and calls its main in schema mode on compose's outputs and the caller's verdict-schema.

Trust boundary checked.

  • Where the loaded code comes from. verdict.cjs comes from the same ci-workflows commit as the reusable, the one the caller's uses: ref resolves to (run.sh#L30-L33). The builder already ran the compose script from that same commit, in process, before this change. Loading a second owner-controlled file from that commit trusts no new source or actor.
  • Who runs it. Only the local eval harness. No workflow, token, secret or lane is involved. None of the 4 changed files matches a trusted-path glob, and none is a trust control (trusted-trigger, token broker, kill switch, merge hold).
  • Caller input. verdict-schema is read from this repository's own caller workflow. It is unquoted strictly as one single-quoted line, and any other form fails closed (build-suite.mjs#L125-L131). It is passed to verdict.cjs as an in-process env object, not through a shell, so there is no injection surface.
  • Fail-closed checks. New checks stop the build when a compose leg has no matching schema step, when a schema step does not run mode: schema on ${{ inputs.verdict-schema }}, or when no schema file is written.
  • Untrusted text. The PR context contains no embedded directives aimed at this lane.

No instructions, standing rules or plugin manifests are touched, and there is no cost surface.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed bc8d6e96f2e6d95102a30f184ef1df5f7b0f0ade: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR fixes the intake re-entry eval builder (build-suite.mjs). Since ci-workflows febb1ed, the reusable's compose step no longer sets schema-file. The builder now gets the schema a different way:

  • It loads check-intake-triage-verdict/verdict.cjs from the same pinned commit, and run.sh extracts it there.
  • After the compose script runs, it calls that module's main in schema mode on compose's allowed, type-names and prompt-file outputs and the caller's verdict-schema.
  • It reads the prompt only after that call, so the verdict-fields block the schema step appends reaches the case.

Every hunk of all 4 changed files has been read. I also read the whole head build-suite.mjs and checked the caller's verdict-schema line in .github/workflows/intake-triage.yml (line 308, in the intake-triage job), which callerInputs parses.

What fails closed:

  • checkSchemaSteps requires one id: schema step for each id: compose step, and each must run mode: schema on ${{ inputs.verdict-schema }}.
  • callerInputs refuses a verdict-schema that is not one single-quoted line, and decodes '' to '.
  • compose throws when the schema step returns no schema-file.

The tests cover each of these paths, plus reading the prompt after the append. The changed assertion (endsWith("{}") → endsWith(\n\n${SCHEMA}\n)) is stricter than before, not looser.

Closing issue #17667, acceptance criteria:

  • Builds from ci-workflows main, every case with a non-empty schema: met in the code path. The run against ci-workflows main is the author's claim and was not verified here. In-repo tests check the mechanism with a stub verdict.cjs. They do not run against the external repository.
  • Test covers the schema read from the new source and fails when it is missing: met. See "build fails when the schema step writes no schema file" and the SCHEMA literal assertion in build-suite.test.mjs.
  • Prompts byte-identical to the pre-febb1ed baseline with verdict-schema emptied, and the baseline an exact prefix with the real one: the author says they checked this against ci-workflows 73f81cb and main; that check was not repeated here. The builder adds nothing of its own between the compose prompt and the schema step's append. The test asserts that order (VERDICT FIELDS directly before OUTPUT_LINE, then the schema). Comparing against an external commit cannot reasonably be an in-repo test.

Notes (none counted as findings):

  • loadSchemaMain is called before the try/finally that removes runnerTemp. If verdict.cjs exports no main, the temp directory is left behind. The impact is negligible.
  • The builder passes verdict.cjs only the five INPUT_* values its schema mode reads. If a later ci-workflows release adds an input to that step, checkSchemaSteps will not notice, so the build would quietly run with that input missing. Not a defect today.
  • The doc comments on callerInputs and compose, and the usage comment in the header, were removed. The usage string printed on bad arguments still documents the command.
  • Spend: none beyond the existing manually run eval (run.sh is unchanged apart from passing --verdict).

No path-scoped rule under .claude/rules/ matches the changed files. No plugin manifest changed. The PR text contains no embedded instructions.

Loosened checks would be marked: fail (default; no loosened_check_verdict: or loosened_check_patterns: line in the prompt); patterns: 0. No loosened_check_decision_record: line either, so the citation requirement was not checked. No loosening was found.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 20, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 3023439 Nov 20, 2026
47 checks passed
@kyle-sexton
kyle-sexton deleted the fix/issue-17667-reentry-eval-schema branch November 20, 2026 17:40
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

intake re-entry eval: build-suite reads a schema-file output the reusable no longer sets

1 participant