Skip to content

feat(mcp): get_judgment_requests; pending on summary rows - #670

Open
mlieberman85 wants to merge 4 commits into
darnitdevorg:mainfrom
mlieberman85:feat/judgment-requests
Open

mlieberman85 wants to merge 4 commits into
darnitdevorg:mainfrom
mlieberman85:feat/judgment-requests

Conversation

@mlieberman85

Copy link
Copy Markdown
Contributor

Stacked on #669. Review the last 3 commits: the spec change, get_judgment_requests, and the skills.

Summary

The json audit output is about 1 MB on wtf-frontend, because every control waiting on a judgment carries its own copy of its files and all of its evidence. Claude Code refuses a tool result that large, so the comply flow saved it to a file and parsed it with shell tools (#644).

  • get_judgment_requests audits the checkout the way submit_judgment does. Per control, it returns only the prompt, hints, evidence digest and file keys, with each file once in a shared files map: exactly the content submit_judgment checks citations against.
    • Pages stay under 40,000 bytes, and remaining names the controls for the next call.
    • Controls with a stored PASS candidate are skipped unless include_judged is set.
    • It records nothing.
  • Summary rows of a PENDING control carry pending.kind, and for a candidate its model, reasoning and number of cited excerpts. A client can tell a judgment request from a candidate without the json output.
  • Skills: darnit-audit and darnit-comply judge from get_judgment_requests. The "~164K" size claims are removed.
  • Spec: 5.4.
  • Tests: tests/integration/test_mcp_server.py now expects 23 tools.

Refs #644.

Type of Change

  • New feature (non-breaking change adding functionality)

Framework Changes Checklist

  • Updated framework spec (docs/architecture/framework-design.md, 5.4)
  • Ran uv run python scripts/validate_sync.py --verbose and it passes

Testing

  • uv run pytest tests/ on the whole rebased stack (18bd63e): 5286 passed, 18 skipped
  • e2e: see the table below
  • uv run ruff check .

End-to-end

darnit-e2e: headless /darnit:darnit-audit openssf-baseline through Claude Code. Confirm tools are disallowed and the repository is named in the prompt.

darnit darnit repo wtf-frontend cosign-installer
main (2026-10-20; cosign-installer on 603bdda) 387s, 44 turns 415s, 47 turns 297s
#653 only (2026-10-21) 299s, 57 turns 250s, 55 turns 185s, 39 turns
full stack, rebased on 8070949 (2026-10-23) 282s, 50 turns, 30 judgments 145s, 23 turns, 15 judgments 141s, 30 turns
  • Results: per-control results match main. The only differences are controls the model judged, and the effect of operator-side answers on wtf-frontend, which needs the repository named. wtf-frontend also shows QA-03.01 and QA-07.01 passing because their platform settings changed on GitHub.
  • Stored candidates skew the comparison. A control with a stored PASS candidate for unchanged evidence is skipped, so run-to-run times depend on how many are stored. darnit's HEAD moved to 8070949, which invalidated its stored candidates, so it was judged in full (30 controls).
  • Denials:
    • darnit: one page of get_judgment_requests was larger than Claude Code's tool-result limit and was saved to a file. The agent's attempt to read it with Bash was denied. This is the oversized single-request follow-up.
    • wtf-frontend: the agent tried to run zizmor itself, and that was denied.

AI assistance

  • No AI assistance was used
  • AI assistance was used

Claude Code (Claude Opus) wrote the change, tests and this description; I reviewed them and ran the e2e.


Drafted with AI assistance (Claude), reviewed and filed by me. Measurements quoted were executed and verified.

@mlieberman85 mlieberman85 self-assigned this Oct 23, 2026
@mlieberman85
mlieberman85 force-pushed the feat/judgment-requests branch 2 times, most recently from 466481b to 566c2b5 Compare October 25, 2026 23:45
Marc-cn
Marc-cn previously approved these changes Oct 29, 2026

@Marc-cn Marc-cn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed its own three commits. Right answer to the 1 MB audit JSON: shared files map keyed by path (#n on digest collisions), per request only what submit_judgment checks citations against, 40 KB pages with remaining fed back as control_ids so later pages are subset audits, summary rows carrying pending.kind, and structured_output=False so the size counted is the size sent. One note: a PENDING llm_judgment control without an llm_consultation is dropped silently (neither in requests nor remaining); #671's 'list the controls skipped' commit looks like it covers that, so fine in the stack. Good to merge in order.

A coding agent gets what it judges from get_judgment_requests: each
control's prompt, hints, and files, with one shared files map holding
exactly the content submit_judgment checks citations against, paged
under 40,000 bytes. Summary rows of a PENDING control carry
pending.kind and a candidate summary (5.4).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Lieberman <mlieberman85@gmail.com>
The json audit output is about 1 MB, because every control waiting on a
judgment carries its own copy of its files and all of its evidence. An
MCP client refuses a tool result that large, so the comply flow spilled
it to a file and parsed it with shell tools.

get_judgment_requests audits the checkout the same way submit_judgment
does and returns only the prompt, hints, evidence digest, and file keys
per control, with each file once in a shared map. Pages stay under
40,000 bytes; 'remaining' names the controls for the next call.
Controls with a stored PASS candidate are skipped unless include_judged
is set. It records nothing.

Summary rows of a PENDING control now carry pending.kind, and a
candidate's model, reasoning, and number of cited excerpts, so a client
can tell a judgment request from a candidate without the json output.

Refs darnitdevorg#644.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Lieberman <mlieberman85@gmail.com>
…tput

darnit-audit and darnit-comply read summary rows, then page through
get_judgment_requests and cite from its files. The '~164K' size claims
in the skills and the audit tool description are gone.

Refs darnitdevorg#644.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Lieberman <mlieberman85@gmail.com>
…erver

darnitdevorg#630 removed create_server_from_dict. The two tests that check the
get_judgment_requests registration now write a minimal framework TOML
and call create_server, as darnitdevorg#630 did for its own tests.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Lieberman <mlieberman85@gmail.com>
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.

2 participants