Repository navigation
[Ready for Review] Adapter: securereviewer - #97
YiDanielLu wants to merge 7 commits into
Conversation
261 tasks, one per scored item of the SecureReviewer test split (ICSE 2026). Grading runs upstream evaluate/SecureBleu.py unmodified from a pinned commit; reward = SecureBLEU / 100. Oracle: 261 trials, 0 exceptions, mean 0.807, every task at its metric ceiling. Parity pending.
|
/review-adapter |
|
Structural validation of commit dcd0112 at 2026-11-17 01:27:07 UTC Adapter contract v1 ( ❌ Adapter Validation:
|
|
Quick heads-up: the automated run for If you consider this PR ready for review, please address those structural items before the next full review. If you know it’s still a work in progress or waiting on parity coordination, feel free to ignore this note for now and come back when ready. Thanks! |
|
On October 19, Harbor updated its new-task template to use a separate verifier by default. I noticed the tasks generated by this adapter still run the grader in the agent’s workspace. Could you switch them to a separate verifier and rerun the oracle on the latest stable Harbor release? Harbor #3712 If you find the full oracle run to be too costly time-wise or compute-wise, maybe you can start with rerunning one representative task? For that task, try the reference solution first, then with a submission you know is wrong. Once you are done, could you please share the task ID and both scores so we can check that the new verifier can grade submissions as expected? If you’ve already run parity or in the middle of running parity, could you keep the original submissions, agent logs, and grading results, preferably in your Hugging Face fork? If only the grading environment changes and those files contain everything the verifier needs, we may be able to regrade the saved submissions without running the agents again. |
Move the SecureBLEU scorer (nltk data + pinned SecureBleu.py) and the item's reference into tests/Dockerfile and set [verifier] environment_mode = "separate". The agent image now holds only patch.diff; /workspace/review.txt is the only declared artifact passed to the verifier. Full oracle on Harbor 0.26.0: 261 trials, 0 exceptions, mean 0.807, every reward identical to the previous shared-verifier run.
|
Thanks @audreina17! Switched to a separate verifier in 3b6b7dc:
On Harbor 0.26.0, task
Full oracle on 0.26.0: 261 trials, 0 exceptions, mean 0.807; every task's reward is identical to the previous (shared-verifier) oracle run. Parity hasn't started yet. The plan is waiting for review by @XiangningLin , so there are no saved submissions to regrade. |
Add --split parity (25 tasks, stratified by security type, seed 42) and the single-call agent used for parity. claude-haiku-4-5, 2 runs per side: original 26.1055 +/- 0.1446, Harbor 26.3495 +/- 0.1436 SecureBLEU.
Generated tasks are now byte-identical on every OS (they were CRLF when generated on Windows).
|
@XiangningLin @audreina17 Ready for review, adapter and parity together.
|
Record the Harbor version (0.26.0, Daytona SDK < 2), the model alias (the endpoint rejects the dated ID), and the run order; correct the max_tokens note (upstream's max_length covers prompt plus reply). Add run_securereviewer_parity.yaml for the Harbor side.
Adds an adapter for SecureReviewer (ICSE 2026, arXiv:2510.26457), listed as "securecodereview" in the adapter sheet. Each task gives the agent one code change (a diff hunk) and asks for a security review with four sections: Security type, Description, Impact and Advice. The review is scored against an expert-refined reference with SecureBLEU, the paper's metric.
SecureBleu.pyskips the 39No Issueitems, so they never count toward the score.evaluate/SecureBleu.pyunmodified, from a pinned commit, on one item at a time. The review is parsed with upstream'sparse_security_review. The reward is SecureBLEU / 100, so Harbor's mean reward × 100 equals the upstream "Average BLEU score".Status:
Oracle: 261 trials, 0 exceptions, mean reward 0.807 (SecureBLEU 80.73). Every task's reward equals that item's maximum score, computed separately by running
SecureBleu.pyon the reference answer outside Harbor. A score of 1.0 isn't possible because of how the metric is built. The reference review gets BLEU 100 and the exact type, but SecureBLEU's keyword-overlap term counts a ratio as 0 when the reference section has nothing to match. So even the reference averages 80.73 (5 of 261 items reach 100). The oracle reaches the maximum score possible on every task. If you'd prefer a different reward normalisation (for example, dividing by each item's ceiling), I'm happy to change it.Parity: done, matching. Plan approved by Xiangning. Haiku via the 2077ai endpoint, tasks on Daytona.
claude-haiku-4-5, on the 25-task parity subset (uv run securereviewer --split parity, stratified by security type, seed 42), 2 runs per side. Both sides send the same prompt in one API call per item (temperature 0,max_tokens2000).86df98bfplusinfer/test_api.py, scored with upstreamSecureBleu.py, unmodified.src/securereviewer/parity/, with the separate verifier.The runs are original 25.96 and 26.25, and Harbor 26.21 and 26.49 (0 exceptions), so the run ranges overlap. The API cost was about $0.30. Reproduction steps for both sides are in the README.
v1.0andparitytags requested.Oracle screenshot:
