Skip to content

[SCR-239] Check the issue fields - #241

Merged
itsryanarmani merged 1 commit into
mainfrom
scr-239-check-the-issue-fields
Sep 3, 2026
Merged

itsryanarmani merged 1 commit into
mainfrom
scr-239-check-the-issue-fields

Conversation

@itsryanarmani

Copy link
Copy Markdown
Owner

Closes #239

What

The checker now validates the issue fields it was ignoring: project, milestone, and relationships written as prose. Labels were the only field it looked at.

Why

GitHub carries five settable fields on an issue and the standard specified one of them. Measured on content-rabbit:

gh api repos/pooriaarab/content-rabbit/milestones --jq length   -> 0
40 open issues sampled: with a milestone 0, with an assignee 0
gh api .../issues/1259 --jq .sub_issues_summary.total           -> 0
gh api .../issues/1259 --jq .issue_dependencies_summary
  -> blocked_by 0, blocking 0

The phase epics are the sharpest case. They say Depends on Phase 10. in prose while carrying zero real dependencies, and the old rule passed them because it matched only Parent: and Blocked by:. A dependency written in prose is invisible to every query, filter and board, so nothing shows the order the phases must run in.

A field with no set defined is not checked. Zero milestones exist across the fleet, so a rule that always required one would fail every issue on day one and get the standard switched off. requireProof in pr-standards already works this way, and this follows it deliberately.

The allowed sets live in the repo's .agents/issues.md, beside the high-stakes paths. A project name is repo-specific and cannot be derived from outside the repo. The token here also lacks read:project, so it could not be read from the API even if that were wanted.

An assignee is never checked. An agent does not decide who does the work.

How I verified

node issue-standards.test.mjs      -> tests 73, pass 73, fail 0
./issue-standards --selfcheck      -> exit 0

The rules, exercised directly rather than trusted:

Depends on #12         -> refused
Depends on Phase 10.   -> refused
Blocks #9              -> refused
"The result depends on the cache being warm."   -> accepted, no false positive
"Related to caching."                           -> accepted, no false positive

no set defined in .agents/issues.md    -> project and milestone not checked
sets defined, value outside them       -> refused, naming the allowed values
sets defined, value inside them        -> accepted

The two false-positive cases matter most. The rule targets a line-leading label followed by a reference, not any prose containing the word, because rejecting honest work is the direction this check must not be wrong in.

A merge conflict worth naming

This branched before #237 landed. Both that work and this one independently wrote a byte-identical fetchRepoFile helper, so the rebase produced a duplicate declaration that would not parse. The duplicate is removed and the exported one from #237 is used.

That is the cost of two agents working the same file from the same base at the same time, and it was caught by node --check rather than by review.

How it was built

Delegated to cursor-agent. The prose-relationship extension, parseAllowedSets, validateFields, and the tests are its work, and it correctly implemented the "not checked when no set is defined" rule, which was the part most likely to be got backwards.

Review found no defect in the delegated code. One apparent false positive turned out to be my own test string replacing the wrong character, not a bug in the rule.

Assisted-by: claude-personal-1:claude-opus-5

The checker validated labels and ignored every other field GitHub
carries. Measured on content-rabbit: zero milestones exist, zero of 40
sampled issues carry a milestone or assignee, zero sub-issues, zero
dependencies.

Extend the prose-relationship rule to Depends on, Blocks and Related
to. Ten phase epics say Depends on Phase 10 and passed the old rule
while carrying no real dependency, which is the exact failure the rule
exists to stop. A sentence merely containing the word depends is not a
finding: the rule wants a line-leading label and a reference.

Read the allowed project and milestone sets from the repo
.agents/issues.md, beside the high-stakes paths, because a project name
is repo-specific and cannot be derived from outside the repo.

A field with no set defined is not checked. Zero milestones exist
across the fleet, so a rule that always required one would fail every
issue on day one and get the standard switched off. requireProof in
pr-standards already works this way.

An assignee is never checked. An agent does not decide who does the
work.
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 142 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 443fe32c-1eb0-4ae5-8128-b53a0642dc17

📥 Commits

Reviewing files that changed from the base of the PR and between 75882b4 and fe55a8d.

📒 Files selected for processing (2)
  • issue-standards.mjs
  • issue-standards.test.mjs

Comment @coderabbitai help to get the list of available commands.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed head: fe55a8d7093a7cd38a600c00cd944070f2ca9fb8

I read pr.diff, council-findings.md, the PR body/verification, AGENTS.md, and traced every flagged line against the actual code and the repo's .agents/ config. No confirmed bugs survive verification, so I pushed nothing.

Council claims, checked against the code

"An issue with two projects passes when both are allowed" (correctness + scope lenses)
Rejected. This assumes an undocumented "at most one project" rule. I grepped issue-standards.md, .agents/*.md, and the PR body for any such constraint — none exists. GitHub issues can legitimately belong to multiple Projects v2 boards, and validateFields (issue-standards.mjs:290) is written to validate membership, not cardinality. No concrete requirement is violated.

"An issue with no project/milestone silently passes when a set is configured" (correctness + scope lenses)
Rejected as intentional, not a defect. The code comment directly above parseAllowedSets (issue-standards.mjs:254-257) and the PR body both state the design explicitly: "A field with no set defined is not checked... a rule that always required one would fail every issue on day one." The PR further states the check is deliberately biased against false positives: "rejecting honest work is the direction this check must not be wrong in." Requiring presence once a set is configured is a plausible future rule, but it isn't the rule this PR implements or claims to implement, and it isn't stated anywhere in the repo.

"gh issue view ApiError (e.g. missing read:project) is swallowed into [], letting a disallowed project pass" (correctness + scope lenses)
Rejected as intentional. fetchIssueProjects (issue-standards.mjs:575) has an inline comment saying exactly this: "Token may lack read:project; then this is empty rather than a check failure." The PR body confirms the token here lacks that scope today. This is the same fail-open convention fetchRepoFile already uses for a 404. Worth knowing about if Allowed projects is ever configured with a token that still lacks the scope, but it's a disclosed tradeoff, not a diff-introduced bug.

Gemini (performance) and Grok (maintainability) timed out — no claims to check. Kimi (security) found nothing.

My own pass

  • Traced the merge-conflict story in the PR body: confirmed there's exactly one fetchRepoFile definition now (issue-standards.mjs:557), the duplicate is gone, and both call sites (runCheck, runLint) use it.
  • Checked NATIVE_LINK_RE against every case in "How I verified" by hand (Depends on #12, Depends on Phase 10., Blocks #9, and the negative cases) — all match the intended line-leading-label semantics, no false positives introduced.
  • PR-standard lens: branch scr-239-check-the-issue-fields, title [SCR-239] Check the issue fields, body has exactly one Closes #239, ## What/## Why/## How I verified, ends in Assisted-by:. 2 files / ~196 counted lines — well under the 40-file/500-line caps.
  • Proof: the "How I verified" section runs the full test suite (73/73) and selfcheck, and hand-exercises the regex/validator against the exact strings named in the PR body. I could not re-run node issue-standards.test.mjs myself in this sandbox (command execution was blocked), so I verified by static trace instead. One gap worth naming: the evidence exercises validateFields/parseAllowedSets directly but doesn't demonstrate the live gh issue view --json projectItems wiring end-to-end — reasonable, since the PR discloses the token can't currently read project data, but a human should keep that in mind before configuring Allowed projects.

No fixes pushed — nothing survived verification as a real defect.

🧑‍⚖️ Council
Model Lens Result
GPT-5.6 (Codex) correctness rejected
Gemini 3 Pro performance no findings (timed out)
Kimi K3 security no findings
Grok 4.5 maintainability no findings (timed out)
GPT-5.6 (scope) scope rejected

@itsryanarmani
itsryanarmani merged commit 120a0da into main Sep 3, 2026
4 checks passed
@itsryanarmani
itsryanarmani deleted the scr-239-check-the-issue-fields branch September 3, 2026 00:04
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.

Check the issue fields, not only the labels

1 participant