Add proposed-work queue fallback report#720
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a read-only CLI script to analyze GitHub intake issues tagged ChangesProposed-work intake queue analysis
Possibly related issues
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6f44ee71-203d-4574-b249-22e77fda2de4
📒 Files selected for processing (3)
docs/admin-runbook.mdscripts/proposed_work_queue.pytests/test_proposed_work_queue.py
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 333b59a9-fe85-4e7b-a948-310dc874dde4
📒 Files selected for processing (3)
docs/admin-runbook.mdscripts/proposed_work_queue.pytests/test_proposed_work_queue.py
xyjk0511
left a comment
There was a problem hiding this comment.
Reviewed PR #720 at current head 5f108a17466721f5d7a15cfc5e06be6d7ad5ab9f.
No blocker found for the proposed-work queue fallback report.
What I checked:
- The new report includes both labeled
proposed-workissues and unlabeled issues that match theProposed work:title plus required template sections, which covers the #684 CLI/API label-loss case without mutating GitHub state. _run_gh_json()is fail-closed for issue commands (list/viewonly) and only allowsgh apiwith explicitGET/HEAD; tests cover rejection of mutating issue/api paths and the positive GET/HEAD allowlist.- The live loader fails when the safety cap is reached instead of silently trusting a truncated queue.
- Markdown/text/JSON output and offline fixture mode are documented in the admin runbook.
- The change is read-only reporting/docs/tests only; it does not label issues, create bounties, post comments, accept work, trigger treasury proposals, or touch payout/proof/wallet behavior.
Validation I ran locally from PR head:
uv run --python 3.12 --with pytest pytest tests/test_proposed_work_queue.py tests/test_docs_public_urls.py -q-> 40 passed.uvx ruff check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py-> passed.uvx ruff format --check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py-> 2 files already formatted..\.venv\Scripts\python.exe scripts\docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.uv run --python 3.12 python scripts/proposed_work_queue.py --repo ramimbo/mergework --format json-> completed read-only live report and returned proposed-work rows including labeled/template detections.
No private data, credentials, wallet material, production mutation, price/exchange/bridge/off-ramp claims, or fabricated payout claims used.
JONASXZB
left a comment
There was a problem hiding this comment.
Reviewed current head 5f108a17466721f5d7a15cfc5e06be6d7ad5ab9f.
I found one live-mode CLI blocker before this report should be considered ready: --repo mode still raises a raw FileNotFoundError traceback when the GitHub CLI is not installed.
Evidence checked:
- inspected
scripts/proposed_work_queue.pyandtests/test_proposed_work_queue.py; - confirmed
_run_gh_json()has read-only command guards, timeout handling, andCalledProcessErrorhandling, but does not catchFileNotFoundErrorfromsubprocess.run(); - reproduced from a fresh worktree in this environment, where
ghis absent:
/Users/jonas/Downloads/microfix-leads/mergework/.venv/bin/python scripts/proposed_work_queue.py --repo ramimbo/mergework --format json
...
FileNotFoundError: [Errno 2] No such file or directory: 'gh'
The PR documents live --repo usage in the admin runbook, so the command should fail with a concise actionable message such as GitHub CLI executable 'gh' was not found; install gh and ensure it is on PATH before using live --repo mode, ideally with a regression test around load_live_queue() or the CLI entrypoint.
Validation run locally:
/Users/jonas/Downloads/microfix-leads/mergework/.venv/bin/python -m pytest tests/test_proposed_work_queue.py tests/test_docs_public_urls.py -q-> 40 passed/Users/jonas/Downloads/microfix-leads/mergework/.venv/bin/ruff check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py tests/test_docs_public_urls.py-> passed/Users/jonas/Downloads/microfix-leads/mergework/.venv/bin/ruff format --check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py tests/test_docs_public_urls.py-> 3 files already formatted/Users/jonas/Downloads/microfix-leads/mergework/.venv/bin/python scripts/docs_smoke.py-> docs smoke okgit diff --check origin/main...HEAD-> cleangit merge-tree --write-tree origin/main HEAD-> clean tree3aead442a342529eee73477c7d88fcb23b650aeb- hosted Quality/readiness/docs/image check succeeded; CodeRabbit succeeded/skipped.
|
Addressed the current-head review blocker in Change:
Verification from isolated
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
scripts/proposed_work_queue.py (2)
221-222:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winMisleading rejection message in the catch-all branch.
This
elsefires for anyghcommand that isn'tissueorapi(e.g.gh pr list,gh repo view), yet the message claims "non-read-only gh issue command", which will mislead anyone debugging the guard.Proposed fix
else: - raise RuntimeError(f"refusing non-read-only gh issue command: {' '.join(args)}") + raise RuntimeError(f"refusing unsupported gh command: {' '.join(args)}")
289-289:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
--input ""silently falls through to live mode.
if args.inputis falsy for an empty string, so--input ""routes toload_live_queue(args.repo)withargs.repobeingNone, producing a crypticTypeErrorinsidesubprocess.runinstead of a clear input error. Guard on presence rather than truthiness.Proposed fix
- data = _load_input(args.input) if args.input else load_live_queue(args.repo) + data = _load_input(args.input) if args.input is not None else load_live_queue(args.repo)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 56f1fc93-d0c2-4095-8286-58ba87e7e6ec
📒 Files selected for processing (2)
scripts/proposed_work_queue.pytests/test_proposed_work_queue.py
|
Addressed the CodeRabbit follow-up comments in Changes:
Verification from isolated
Hosted Quality/readiness/docs/image checks and CodeRabbit are green on the current head. |
prettyboyvic
left a comment
There was a problem hiding this comment.
Reviewed current head c163b3b623522c50280fa5c520f82d8a8fa15f59 as a non-author.
Evidence inspected:
scripts/proposed_work_queue.py: checked proposed-work detection for labeled issues and unlabeledProposed work:title/body fallback, required-section normalization, read-onlygh issue/ explicit GET/HEADgh apiguardrails, missing-ghwrapping, timeout/error handling, and the live issue-list safety cap.tests/test_proposed_work_queue.py: verified coverage for fallback detection, missing-section warnings, markdown output, fixture input mode, read-only command allowlist/rejections, missinggh, and safety-cap failure.docs/admin-runbook.md: verified usage docs for live--repo, offline--input, text/JSON/Markdown output, and explicit read-only semantics.
Validation run locally on the PR worktree:
git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD->7a42977f58ff1471e12ee7b2d3cb7c1696812284.PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ..\mergework\.venv\Scripts\python.exe -m pytest tests\test_proposed_work_queue.py tests\test_docs_public_urls.py -q-> 42 passed...\mergework\.venv\Scripts\python.exe -m ruff check scripts\proposed_work_queue.py tests\test_proposed_work_queue.py-> passed...\mergework\.venv\Scripts\python.exe -m ruff format --check scripts\proposed_work_queue.py tests\test_proposed_work_queue.py-> 2 files already formatted...\mergework\.venv\Scripts\python.exe scripts\docs_smoke.py-> docs smoke ok...\mergework\.venv\Scripts\python.exe scripts\proposed_work_queue.py --repo ramimbo/mergework --format json-> live read-only smoke succeeded, saw 43 open issues and 31 proposed-work rows.- Hosted GitHub checks are green: Quality/readiness/docs/image passed; CodeRabbit passed/skipped.
No blocking issues found. The PR stays read-only, keeps the #684 scope narrow, and current-head follow-up addresses the earlier missing-gh raw traceback concern with a concise actionable error.
Summary
Bounty #647
Source issue: #684
This PR adds a read-only proposed-work intake report so maintainer triage can include CLI/API-created proposed-work issues that did not receive the
proposed-worklabel.scripts/proposed_work_queue.pywith JSON, text, and Markdown output.proposed-workissues and unlabeled issues whose title starts withProposed work:and whose body contains the expected proposed-work sections.ghread guard: onlygh issue list/vieware allowed, andgh apirequires explicit GET/HEAD.gh api --method GET/HEADallowlist paths and mutating-command rejection paths.--inputfixture usage indocs/admin-runbook.md.Verification
PATH=/Users/a30706/miniconda3/envs/dollar-hunt-mergework/bin:$PATH python -m pytest tests/test_proposed_work_queue.py tests/test_docs_public_urls.py -q-> 40 passedPATH=/Users/a30706/miniconda3/envs/dollar-hunt-mergework/bin:$PATH python -m ruff check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py-> All checks passedPATH=/Users/a30706/miniconda3/envs/dollar-hunt-mergework/bin:$PATH python -m ruff format --check scripts/proposed_work_queue.py tests/test_proposed_work_queue.py-> 2 files already formattedPATH=/Users/a30706/miniconda3/envs/dollar-hunt-mergework/bin:$PATH python scripts/docs_smoke.py-> docs smoke okgit diff --check-> passedQuality, readiness, docs, and image checkspassed on previous headb97f4e9199c0ac9209f72cc038be3feae9d098f8; current head5f108a17466721f5d7a15cfc5e06be6d7ad5ab9fis rerunning checks.python scripts/proposed_work_queue.py --repo ramimbo/mergework --format jsondetected Proposed work: expose public deployment revision metadata for API and MCP #718 astitle_body_fallbackwithmissing_proposed_work_label, while Proposed work: filter treasury proposals by payout recipient #680/Proposed work: handle unlabeled proposed-work intake from CLI submissions #684 remainedlabel_and_template.Review follow-up
Addressed CodeRabbit's actionable comments:
--inputfixture mode;_run_gh_json()so future changes cannot accidentally run mutatinggh issueor implicit-POSTgh api -f/-Fcommands;gh api --method GET/HEAD;Duplicate Check
Out of Scope
Summary by CodeRabbit
New Features
Documentation
Tests