Repository navigation
Share deterministic grading and add bounded input readers - #249
Conversation
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
The shared grading adapters preserve the contracts examined so far. One bounded-input issue needs a regression fix before approval. I reproduced the inline findings without contacting endpoints or executing declared hooks/packages. I will address them with regression tests and recheck the resulting head before approval.
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed 976538f. The inline YAML merge-expansion issue is fixed and independently rechecked; shared grading contracts, installed Python 3.9.6 verifier behavior, bounded readers and the public activation boundary are preserved. Focused tests, builds, Ruff, Fern and completed security/package checks pass. No actionable code findings remain. Some platform CI checks are still pending and must complete before merge; this is approval of the reviewed code, not an all-CI-green claim.
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
* refactor: add bounded input and private format foundations * refactor(tier3): share standalone shell lexical rules * refactor(tier3): share complete shell invocation analysis * refactor(tier3): use one deterministic grading implementation * docs: clarify metadata walk preconditions * fix: snapshot shared helpers for historical shell comparisons * fix: isolate source and historical verifier imports Signed-off-by: Christopher Kevin <[email protected]>
* chore: start follow-up fixes for the #249 and #250 review * fix(security): unwrap nested env defaults without recursion * fix(security): treat an Authorization header with any scheme as a credential * fix(security): recognise current OpenAI and Anthropic API key shapes * fix(security): drop URL userinfo written with one slash from report text * fix(security): keep userinfo out of safe_url for one-slash URLs * test: restore the MCP and hook URL credential parity test * fix(security): allow separators between references in an Authorization header * fix(plugin): report hook auto-approval when the allow decision is computed * fix(plugin): see the interpreter behind a wrapper option that takes a value * fix(plugin): continue a hook pipeline after a trailing pipe * fix(plugin): find curl-into-shell pipelines inside Python and JavaScript strings * fix(plugin): read the hook script after a subshell, cd option or attached ';' * perf(plugin): unwrap only pipeline stages that start with a launch wrapper * fix(plugin): follow hook script references past the second level * fix(security): report inline credentials anywhere in a hook command * fix(plugin): name the host Claude Code posts to for a backslash hook URL * fix(security): ignore command substitutions in hook inline-secret checks * fix(plugin): keep LSP parser chains critical and bound settings checks * fix(plugin): match MCP merge, Windows root paths and ref redaction * fix(plugin): classify PowerShell rules and walk tables under doc keys * fix(security): count directory links against the Windows discovery budget * test: write the redirect test fixtures as UTF-8 * fix(plugin): drop empty name segments in string dependency refs * fix(plugin): treat an SSH host alias origin as a hosted remote * fix(plugin): decode the origin remote URL as UTF-8 * fix(security): refuse dependency refs through .git and other never-content folders * fix(plugin): cap ref-derived text in dependency reasons * fix(plugin): keep linked or unreadable marketplace sources advisory * fix(plugin): probe only the supported manifest paths when locating a plugin * fix(plugin): list hidden and dotted children of a declared skills folder * fix(plugin): stop inventorying a Codex commands map * fix(plugin): report pruned-folder skills in any spelling and incomplete walks * fix(plugin): split frontmatter at the first closing dashes like Claude Code * fix(plugin): keep CRLF frontmatter values whole in the lenient retry * fix(tier3): honour HTTP-date Retry-After in the verifier on Python 3.9 * fix(plugin): report MCP server code in case-variant pruned folders * test(ci): score a trajectory with the Python 3.9 Harbor verifier * test(tier3): cover verifier adapter options that change results * fix(plugin): reject a trailing newline in Agent Plugins schema URLs * fix(security): keep YAML merges, huge ints and bad tags in bounds * fix(security): keep a plain = YAML key loading in unique-key mode * fix(plugin): read a bare 0x IPv4 part as zero in MCP host checks * fix(plugin): keep MCP URL checks when a reference or bracket hides the host * fix(plugin): catch MCP command credentials in URLs, Authorization headers and --creds * fix(plugin): report MCP shell lines behind PowerShell, package runners and other launchers * fix(plugin): redact and bound MCP transport values and server names in findings * fix(plugin): scan permission flags in linear time per string * refactor(plugin): expose the MCP finding message prefix * fix(plugin): strip the bounded MCP prefix when rewording LSP findings * test(ci): expect only applicable reward dimensions in the 3.9 smoke Signed-off-by: Narendran Raghavan <[email protected]>
Summary
Host grading and the standalone Harbor verifier currently carry duplicate shell parsing and deterministic checks. Both now consume the same lexer, invocation parser and check implementation; small adapters preserve the standalone argument and result contracts.
The change also adds bounded structured-input readers, narrow filesystem helpers and private client manifest profiles. Existing public commands, detection, policy defaults and report routing retain their current behavior.
Production code is reduced by 5,247 lines net. Across all 20 changed files, including tests, packaging and CI, the diff is +5,946 / −10,175 (net −4,229). The standalone verifier also receives explicit Python 3.9 compatibility corrections and an installed-package Python 3.9 CI smoke.
Verification
make lintmake testmake buildVerification at
9dc2841bb00c03d3daaa2b150b0479c14e8c0210:PYTEST_ADDOPTS='-n 4' make test; lint and sdist/wheel builds also pass.47f6058. Comparisons normalize run paths and timestamps; console comparison also ignores whitespace and box borders. Public command/option, schema, detection and policy contract probes match.Live agent/provider, judge and Harbor backend E2E was not run because no provider is configured. Container verification uses controlled trajectories and the existing judge-skip paths. Native Windows and the remaining CI platform/version matrix still require CI results.
Release Impact
CHANGELOG.mdDocuments the standalone verifier's Python 3.9 compatibility correction.
Review corrections and current validation
Previously reviewed head:
976538f98630d6e74782483968da3312d2cbca07. That branch included main at the time and preserved both changelog updates.Current revision and validation
Current head:
02899891bb0612ba264daec0778f2cba52a3b8ce, merged with main0c3e55c4a3528b078dc25d90d0341f1a4abca981without rewriting history. The latest main merge changed history only: both the main tree and this PR tree are byte-identical to the previously tested trees (935b1628and6b417adb). Gitleaks passed on the resulting history. The only conflict was inCHANGELOG.md; both the verifier and rubric-evaluation release notes were retained.After integration, 233 targeted dependency, discovery, rubric, bounded-parser and public-compatibility tests passed (1 skipped), lint passed, and wheel/sdist builds passed on the integrated tree. An installed base-only wheel ran 64 real local-Git dependency checks and produced JSON and Markdown CLI reports. The combined local full suite finished with 17,204 passed, 28 skipped and 1 failed:
test_exec_cancellation_terminates_background_descendantsobserved a background child write after cancellation. The test and its process-management implementation are identical to current main. The exact case passed six serial runs on the tested integration tree and six on main; the full-run failure's cause remains unconfirmed. Fresh hosted CI is in progress, and earlier results above remain tied to their original heads.