Add public safety checks to submission gate#344
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA submission quality gate now detects restricted public content (secrets, credentials, private keys) and MRWK price/payout claims using regex patterns. A new ChangesPublic-safety content detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
TateLyman
left a comment
There was a problem hiding this comment.
Reviewed the public safety check for Bounty #319. I found one validation blocker before merge.
Blocker:
- The MRWK price/payout regex currently warns on compliant negative disclosure text. Running this PR body through the gate now returns
WARN public_safetybecause the standard sentenceNo secrets, wallet private keys, payout credentials, private vulnerability details, deployment values, or MRWK price claims are included.containsMRWK price claims, even though it is explicitly saying no such claims are included. That makes the new check noisy for the exact safe boilerplate this repo asks contributors to include. Please either exempt negated phrases likeno ... MRWK price claims, tighten the regex to positive value assertions, or add a regression that the existing no-secrets/no-MRWK-claims boilerplate passes.
Other review notes:
- The secret/token/private-key fail path is useful and the focused tests cover the obvious credential patterns.
- The branch is currently
DIRTY, likely because PR #342 also changedscripts/submission_quality_gate.py,tests/test_submission_quality_gate.py, anddocs/agent-guide.md; it needs a rebase/refresh before merge. - CodeRabbit was still processing when I checked, and no hosted quality conclusion was available yet.
Validation run locally:
uv run --extra dev python -m pytest tests/test_submission_quality_gate.py tests/test_docs_public_urls.py -q-> 35 passed.uv run --extra dev ruff check scripts/submission_quality_gate.py tests/test_submission_quality_gate.py docs/agent-guide.md-> passed.uv run --extra dev ruff format --check scripts/submission_quality_gate.py tests/test_submission_quality_gate.py-> passed.uv run --extra dev python -m mypy scripts/submission_quality_gate.py-> passed.uv run --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.- Gate run against this PR body with live repo data returned WARN, including the false-positive public_safety warning above.
Bounty #319
Summary
Why this helps
Issue #319 explicitly asks agents not to post private keys, seed material, secrets, deployment credentials, private vulnerability details, or unsupported public claims. The reusable gate can now catch those public-artifact risks before a PR body or claim comment is submitted.
Validation
uv run --extra dev python -m pytest tests/test_submission_quality_gate.py -q-> 18 passed.uv run --extra dev python -m pytest tests/test_submission_quality_gate.py tests/test_docs_public_urls.py -q-> 35 passed.uv run --extra dev python -m pytest -q-> 328 passed.uv run --extra dev ruff format --check .-> 46 files already formatted.uv run --extra dev ruff check .-> All checks passed.uv run --extra dev mypy app-> Success: no issues found in 13 source files.git diff --check-> clean.uv run --extra dev python scripts/submission_quality_gate.py --text-file <this PR body> --repo ramimbo/mergework --format text-> PASS.This PR does not claim acceptance; it only adds an advisory pre-submission check.
Summary by CodeRabbit
New Features
Documentation
Tests