Skip to content

feat(intake-triage): set the Issue Type and clear the triage floor - #741

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/intake-triage-issue-type
Oct 12, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/intake-triage-issue-type

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Refs: #662

Summary

The intake-triage lane now sets the native Issue Type and takes a triaged
issue off the needs-triage floor, so it stops reading as raw intake. An
escalation now routes to a person through needs-human with a proposed work
class, not through the floor.

Fix

  • Compose reads the repository's enabled Issue Types over GraphQL and its
    live work-class: labels, and adds type and proposed_class enums (each
    plus none) to the output schema and the prompt. If the types cannot be
    read, type is left out and the floor stays.
  • A triage is usable when the run was clean, had no permission denial, and
    named one of the Issue Types. Apply then sets the type through
    updateIssue(issueTypeId) and reads it back. GitHub's docs say a type
    change made without push access is dropped silently, so a type that did
    not take logs a warning and keeps the floor.
  • When the type took, the lane removes the new floor-label input (default
    needs-triage; empty turns removal off) if:
    • the run escalated, where needs-human replaces the floor and the fixed
      note gains a Proposed work class: line (apply-outcome.md, "Lane barred
      from recording a class"); or
    • it did not escalate, applied exactly one priority: label, and applied
      no status: or area: security label.
  • With no usable triage (a model failure, invalid output, or no type), the
    floor stays. After any run that is not routed, the lane adds the floor if
    it is missing. A floor label that does not exist in the repository turns
    floor handling off, and one that is an admission label fails compose.
  • An enabled Issue Type named none (in any case, with or without
    padding) is dropped at compose time, so it cannot collide with the
    no-type sentinel.
  • intake-label-needs-triage.yml now reads the issue's live labels instead
    of the opened payload, falling back to the payload if that read fails.
    It also skips an issue that carries the new human-label input (default
    needs-human). A run that lands late no longer re-adds a floor the lane
    removed.
  • The lane never applies agent-ready or a work-class: label. Compose
    removes both from allowed-labels and fails if escalation-label is one
    of them. The autonomy admission policy forbids any agent-writable surface
    from supplying the admission work class.
  • Permissions do not change (contents: read, issues: write), and the
    model gets no write path.

Verification

  • node --test .github/scripts/*.test.cjs: 366 pass, including the new
    intake-label-needs-triage.test.cjs. The sentinel test and the two
    late-labeler tests fail against 5243c96.
  • biome ci on .github/scripts with the fixture config: no errors.
  • The new usable-escalation test fails against the previous head (5055c36),
    which kept the floor on every escalation.
  • report-lane-outcome tests: 21 pass.
  • actionlint, zizmor --offline, markdownlint-cli2 and typos report
    nothing on the changed files.
  • review:security-reviewer ran twice and found no P1 to P3 issues. The P4
    fixes are in:
    • admission labels can no longer come through caller config;
    • an escalation label equal to the floor label is never removed;
    • an errored run with output sets no type.
  • Of the P5 notes, the summary now shows only a validated type, the code
    comment is corrected, and a failed label write has a test. Two are open:
    • The escalated note does not carry the work-items:escalation marker,
      so attend-queue does not read the proposed class yet.
    • Type names are not checked for control characters.
  • Not yet verified live: whether the job's GITHUB_TOKEN can set an Issue
    Type with contents: read. The first run's summary line Issue Type:
    answers it.

Related

  • Needs a release from release-tag.yml, a standards runner-policy contract
    for the new SHA (allowedInputs may add floor-label), and a caller
    repin in claude-code-plugins.

🤖 Generated with Claude Code

A run that was not escalated sets the Issue Type it named from the
repository's enabled types and reads it back. When the type took and
exactly one priority label and no status or security label was applied,
it removes the floor label (new input floor-label, default needs-triage).

Refs: #662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 12, 2026 19:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T19:21:12.630088Z 5055c36 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 6m 5s —— View job


Code review complete

  • Gather context (PR diff, CLAUDE.md/REVIEW.md, standards contract)
  • Review intake-triage.yml changes
  • Review intake-triage-apply.test.cjs changes
  • Review README.md changes
  • Adversarially verify candidate findings
  • Post findings and summary

Scope: this is the code-review lane; REVIEW.md scopes security findings to the dedicated security lane (pr-review-security.yml exists in this repo), and the PR body notes a separate security-reviewer pass already ran, so this review stays on correctness/maintainability/tests.

Finding (posted inline)

One correctness finding, confirmed by independent verification, posted as an inline comment on .github/workflows/intake-triage.yml:243:

The "none" sentinel the model uses to mean "no Issue Type fits" shares its namespace with real, admin-defined Issue Type names. If a repository/org enables a custom Issue Type literally named none, the schema enum (line 243) and the types lookup map (line 262, keyed only by real type names) can't distinguish the sentinel from that real type. The apply step's Object.hasOwn(types, wanted) check (line 432) would then be true for wanted === "none", so a model response meant as "nothing fits" would instead set the issue's Issue Type to the admin's none-named type — the opposite of the intended "leave it unset" behavior. Suggested fix: exclude a type named exactly none when filtering enabled types (line 222).

Other things checked, no issues found

  • The order-of-operations guarantee the workflow comment documents (comment + labels written first; Issue Type set and read back only after; floor label removed only when the type took, exactly one priority: label applied, and no status:/area: security label) matches the actual code at .github/workflows/intake-triage.yml:399-451.
  • clean, escalated, and ran gating correctly prevents the type-set/floor-removal path on infra failures, max-turns stops, and escalated runs — including the new "errored run with structured output" case the tests added.
  • The new compose/apply tests (intake-triage-apply.test.cjs) exercise the behaviors described in the PR body (type set + floor cleared, escalated keeps floor, dropped type warns and keeps floor, wrong priority count keeps floor, status/security label keeps floor, empty floor-label never removes). I was not able to execute node --test in this environment (no shell execution permission), so the PR's "350 pass" claim is author-reported and unverified by me, not independently confirmed.
  • README.md's new paragraph accurately describes the implemented behavior (Issue Type set-and-read-back, floor-label removal conditions, default and empty-string semantics).
  • No paved-path row exists in this repo's docs/standards/README.md index, so no paved-path criteria apply here.
    · Branch

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 23s —— View job


Security review (/review:security-review)

  • Gather context (PR diff, body, changed files)
  • Review .github/workflows/intake-triage.yml (compose + apply steps)
  • Review .github/scripts/intake-triage-apply.test.cjs and README.md
  • Post findings

Scope

Reviewed only the files this PR changes: .github/workflows/intake-triage.yml, .github/scripts/intake-triage-apply.test.cjs, README.md. GitHub Actions hardening (triggers, permissions:, pinning) is zizmor's lane per the review brief and is out of scope here; permissions: is unchanged (contents: read, issues: write).

Checked and found sound

  • GraphQL injection: both new github.graphql calls (Issue Types query, updateIssue mutation) pass the issue node ID and type ID as typed variables ($id: ID!, $type: ID!), never string-interpolated — no injection surface.
  • Shell-arg injection: Issue Type names are filtered with !t.name.includes("'") (intake-triage.yml#L222) before being joined into the --json-schema '...' single-quoted shell argument, mirroring the existing label filter — prevents breaking out of the quoted arg the same way labels already do.
  • Model output validation: the new type field is only trusted when Object.hasOwn(types, wanted) (intake-triage.yml#L432) against the compose-time snapshot, and the mutation's result is read back and compared before typeSet is trusted — a silently-dropped type change (no push access) correctly keeps the floor rather than assuming success.
  • No new write path for the model: the model still returns JSON only; addLabels/updateIssue/removeLabel are all driven by the no-model apply step, consistent with the lane's stated security model. agent-ready is never in the labels this lane can touch.

Finding (IMPORTANT)

The floor-label removal gate validates output shape, not that the model's classification wasn't manipulated by the issue text it's reading.

intake-triage.yml#L420-L451: the gate for clearing needs-triage requires the run wasn't escalated, the type mutation took, exactly one priority: label, and no status:/area: security label. Every one of those signals is itself derived from the same model output that the issue body (untrusted, per the SECURITY MODEL header) is trying to steer. The gate catches ambiguous or low-confidence output (the model is instructed to set needs_human: true when unsure), but does nothing to detect a successful prompt injection that gets the model to confidently, consistently misclassify — e.g., issue text that socially-engineers the model into reading an actual security report as a routine bug: labels: ["priority: low"], no area: security, needs_human: false, type: "Bug". That output is internally "clean" by every check the gate runs, so the mutation succeeds, needs-triage is removed, and the issue now reads as already-triaged — exactly the "model alone pulls an issue out of the queue" risk the PR description names as P3, but via output manipulation rather than a direct write path (which is otherwise correctly closed off).

This is inherent to trusting an LLM's one-shot classification of adversarial text for a consequential, autonomous action, and the PR already narrows it as much as the output shape allows. Worth a maintainer judgment call rather than a blocking code change: e.g., is needs-triage removal reversible/visible enough (a human still sees the comment, applied labels, and issue-type change in the timeline) that a missed case gets caught on a second look, or does something downstream key off the absence of needs-triage to stop looking at an issue entirely? If the latter, consider treating the gate as "necessary but not sufficient" and keeping a lightweight audit trail of auto-cleared floors.

Not reviewed as security findings (informational, already called out by the author)

  • The unvalidated control characters in admin-defined Issue Type names (the PR's own P5) — admin-controlled surface, informational per the author's note, not re-flagged here.
  • The live permission question ("can issues: write actually set an Issue Type") — fails safe (warns, keeps floor) either way, so not a vulnerability.

No injection, authorization, or token-handling issues found beyond the one judgment call above.

Fix this →
· Branch: feat/intake-triage-issue-type

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5055c36e5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/intake-triage.yml Resolved
Comment thread .github/workflows/intake-triage.yml Resolved
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

claude-security-review has reviewed this pull request through 02c0fa2; a later push is reviewed from there.

Comment thread .github/workflows/intake-triage.yml Resolved
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

claude-review has reviewed this pull request through 02c0fa2; a later push is reviewed from there.

An escalated run whose triage was usable (clean, no permission denial,
a type named) now sets the Issue Type, posts a proposed work class in
its note, and removes the floor label, since needs-human replaces it.
Without a usable triage the floor stays. Admission labels (agent-ready,
work-class:) can never be applied, whatever the caller allows, and a
floor label the run applied itself is never removed.

Refs: #662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 16s —— View job


Code review complete

  • Gather context (incremental diff, REVIEW.md, standards)
  • Review changes since 5055c36 in intake-triage.yml
  • Review changes since 5055c36 in intake-triage-apply.test.cjs
  • Review changes since 5055c36 in README.md
  • Adversarially verify candidate findings
  • Post findings and summary

Scope: incremental review of HEAD 5243c96, limited to what changed since the last review of 5055c36, per REVIEW.md splitting security findings to the dedicated security lane. This commit adds: escalated-but-usable triage now sets the Issue Type and proposes a work class in the escalation note, admission labels (agent-ready, work-class:*) are now also blocked from the escalation-label input, and the floor-removal gate now also fires on a usable escalation (not just a confident one).

Findings

None. I traced the new usable/routed/proposed logic in intake-triage.yml:420-490 against every new test case in intake-triage-apply.test.cjs by hand (escalated+usable, escalated+no-type, permission-denial-with-typed-output, escalation-label-equals-floor-label, failed label write, out-of-allowlist proposed class, work-class/agent-ready never applied even when allowed) and didn't find a case where behavior diverges from what the tests assert or from the PR description. The new !labels.has(env.FLOOR_LABEL) guard correctly covers the one new edge case (escalation label configured equal to floor label) without weakening the existing "type took" / "exactly one priority label" gates for the non-escalated path.

README.md's updated paragraph matches the implemented behavior (usable-triage definition, floor removal on escalation-or-single-priority, Proposed work class: line, work-class/agent-ready never applied).

No paved-path row exists in this repo's docs/standards/README.md index, so no paved-path criteria apply to this change.

Not independently verified: I could not run node --test in this environment (no shell-execution approval), so the PR body's "357 pass" / "17 intake cases" counts are author-reported, not confirmed by me. I did trace the new assertions against the implementation by hand instead.

Out of scope here (already raised on this PR, on unchanged lines): the "none" sentinel/Issue-Type-name collision (Codex + this lane's earlier review, both on commit 5055c36) and the floor-labeler race (Codex, same commit) are both on code this diff doesn't touch, so they're not re-reported by this incremental pass.
· Branch

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 45s —— View job


Security review (/review:security-review)

  • Gather context (incremental diff, PR body, prior review comments)
  • Read .claude-lane/incremental.diff (changes since 5055c36)
  • Invoke /review:security-review for the incremental scope
  • Post findings

Scope

Incremental review of commit 5243c96 against the last-reviewed commit 5055c36, restricted to what actually changed: .github/workflows/intake-triage.yml, .github/scripts/intake-triage-apply.test.cjs, README.md. This adds the proposed_class (work-class) output, the admission-label guard, the usable-escalation path, and the floor/escalation-label collision guard. All other files were already reviewed at 5055c36, and the "none"-sentinel collision flagged in that round (intake-triage.yml#L253) is untouched by this increment, so it isn't re-flagged here.

Checked and found sound

  • Admission labels can't reach the model as a direct write. admission() strips agent-ready and any work-class: label out of allowed regardless of caller config (intake-triage.yml#L217-L222), composing fails outright if escalation-label itself is one (L218-L219), and the apply step re-checks the same exclusion independently of allowed (L402) — two independent gates, not one shared check that could be bypassed by changing a single input.
  • proposed_class is advisory only, enum-checked, never applied as a label. classes is built from the repository's live work-class: labels (admin-controlled, same trust tier as Issue Types), filtered for the shell-quote character the Issue Type list already filters for (L224). The apply step only accepts output.proposed_class when it's a member of that same set (L420), and the value only ever lands in the posted comment text, never in labels — confirmed by the new tests at intake-triage-apply.test.cjs ("never applies a work class or agent-ready, even when allowed", "a class outside the repository's work classes is not proposed").
  • The "usable" gate for the new escalated-but-type-setting path correctly excludes the risky escalation reasons. usable requires clean (result.subtype === "success" && !result.is_error) and denials.length === 0 (L419). Tracing the escalation reasons that can accompany a "clean" run: a max-turns stop sets result.subtype === "error_max_turns", which fails clean; a permission denial is excluded explicitly; a missing/invalid structured output fails Boolean(output). Only needs_human: true and the credential-like-comment check can co-occur with clean and a valid enum type — both are deliberate, tested ("a usable escalated triage sets the type, proposes the class and removes the floor"), and the type/class values themselves are still enum-validated independent of the escalation.
  • The escalation/floor-label collision the previous round flagged is closed. Removal now additionally requires !labels.has(env.FLOOR_LABEL) (L484), so a caller that sets escalation-label equal to floor-label keeps the floor on the issue instead of having it stripped right after being applied — covered by the new "a floor label the run applied as its escalation label stays" test.
  • No new injection surface. The updateIssue GraphQL mutation still passes the type ID as a typed variable, never interpolated. The new classes array goes through the same single-quote filter as types before being embedded in the --json-schema shell argument (L224, mirroring L221).
  • Fail-safe ordering preserved. A failed addLabels/comment write still short-circuits both the Issue Type mutation and the floor removal (!failure && usable, !failure && typeSet && ...), now also exercised for the escalation path by the new "a failed label write on an escalation sets no type and keeps the floor" test.
  • Instruction-surface check: the doc-comment rewording at the top of the workflow (L36-L51) and in the floor-label input description (L92-L97) describes behavior, it doesn't remove an enforced guardrail — the one real gate change (dropping the old unconditional !escalated requirement before setting the Issue Type) is replaced by the explicit, narrower denials.length === 0 check plus the unchanged enum check, not a deletion with nothing left enforcing it. The docs/conventions/instruction-exception-register file isn't present in this checkout, so the protected-class list itself wasn't consulted; the recognition-by-consequence pass above found no removed rule whose protected action is now reachable unchecked.

No CRITICAL, IMPORTANT, or SUGGESTION findings in this incremental diff.
· Branch

An enabled Issue Type named none (any case or padding) is dropped at
compose time so it cannot be mistaken for the no-type sentinel.

The lane now owns the floor label: after any run that ran, it removes it
from a routed triage and otherwise adds it if missing, so the result no
longer depends on which workflow finishes first. The floor labeler reads
live labels instead of the opened payload, falls back to the payload when
that read fails, and skips an issue already routed to a person. A floor
label that is an admission label fails compose; one missing from the
repository turns floor handling off.

Formats the test files with Biome.

Refs: #662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 5m 57s —— View job


Code review complete

  • Gather context (incremental diff, REVIEW.md, standards)
  • Review .github/scripts/intake-label-needs-triage.test.cjs (new)
  • Review .github/workflows/intake-label-needs-triage.yml
  • Review .github/workflows/intake-triage.yml changes since 5243c96
  • Review .github/scripts/intake-triage-apply.test.cjs changes since 5243c96
  • Review README.md changes since 5243c96
  • Adversarially verify candidate findings
  • Post findings and summary

Scope: incremental review of HEAD 7558a3f, limited to what changed since the last review of 5243c96, per REVIEW.md splitting security findings to the dedicated security lane. This commit: filters an Issue Type literally named none out of the schema/enum (closing the sentinel collision Codex and this lane both flagged on 5055c36), and makes intake-label-needs-triage.yml read live issue labels (and skip on the escalation label) while intake-triage.yml's apply step now adds the floor label back whenever it doesn't clear it, closing the ordering race Codex flagged on 5055c36.

Finding (posted inline)

One correctness finding, confirmed by independent verification, posted inline on .github/workflows/intake-triage.yml:517:

floorCleared = true now runs even when the removeLabel call it follows threw a 404 (floor label already absent) and that 404 was silently swallowed by the inner catch. At the prior reviewed commit (5243c96), this flag was set only immediately after a successful removeLabel call, so a 404 left it false. The labels set checked at line 511 is this run's own freshly-computed output labels, not the issue's live labels, so the 404 branch is genuinely reachable (e.g. a prior run already cleared the floor, or it was removed manually) — not dead code. The job summary's - Floor label: ${floorCleared ? "removed" : ...} line can now claim "removed" when nothing was removed, which weakens exactly the kind of audit trail the security lane's earlier review on this PR asked for around auto-cleared floors. No test exercises this path (the removeLabel mock in intake-triage-apply.test.cjs never throws).

Other things checked, no issues found

  • The none-sentinel fix (t.name.trim().toLowerCase() !== "none" at intake-triage.yml:410) correctly closes the collision Codex and this lane both flagged on 5055c36, verified against the new "compose drops an Issue Type that collides with the none sentinel" test by tracing the filter by hand.
  • intake-label-needs-triage.yml now reads live labels via listLabelsOnIssue rather than the stale event payload, and also skips when human-label (default needs-human) is already present, with a documented fail-open fallback to the payload on an unreadable live-label list (a fallback that can only re-add the floor, never wrongly drop it). Traced all four new tests in intake-label-needs-triage.test.cjs by hand against the implementation and found no divergence.
  • intake-triage.yml's apply step now unconditionally converges the floor to the correct end state on every ran run (remove when typeSet && routed, else add if missing) using idempotent writes (addLabels no-ops if present; removeLabel 404 is caught), which closes the deterministic half of the race: whichever lane runs second now reads a consistent state rather than acting on the stale opened-event payload. A fully concurrent sub-second overlap between the two lanes remains theoretically possible, but is already called out in this PR and the workflow's own docs as a best-effort, non-gating guarantee, so it isn't re-flagged as a new finding.
  • The compose step's new floor output threads the validated/resolved floor label (empty when missing from the repo's label taxonomy, or when it's an admission label) through to the apply step via ${{ steps.compose.outputs.floor }} instead of the raw inputs.floor-label, so the apply step's addLabels call can never attempt to create an unregistered label — consistent with this repo's existing fail-closed-on-missing-label contract. Verified against the "compose turns floor handling off for a floor label the repository lacks" and "compose rejects an admission label as the floor label" tests.
  • README's updated paragraphs (human-label skip behavior, floor-label empty/missing semantics, the "adds the floor if missing" sentence) match the implemented behavior, including the one asymmetry (an infra-failure run leaves the floor entirely to the labeler rather than adding it itself) that the README's wording glosses over slightly but doesn't misstate in a way that would mislead a caller.

No paved-path row exists in this repo's docs/standards/README.md index, so no paved-path criteria apply here.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 5m 11s —— View job


Security review (/review:security-review)

  • Gather context (incremental diff since 5243c96, PR body, prior findings)
  • Read .claude-lane/incremental.diff and the full updated workflow files
  • Invoke /review:security-review for the incremental scope
  • Post findings

Scope

Incremental review of commit 7558a3f against the last-reviewed commit 5243c96, restricted to what changed: .github/workflows/intake-triage.yml, .github/workflows/intake-label-needs-triage.yml, .github/scripts/intake-label-needs-triage.test.cjs, .github/scripts/intake-triage-apply.test.cjs, README.md. This commit fixes the "none"-sentinel collision and the floor-labeler race both prior rounds flagged: the floor labeler now reads live labels and skips an issue already routed to a person; intake-triage now validates the floor label (exists, not an admission label) at compose time and both removes it on a confirmed triage and adds it back on any other outcome, so the result no longer depends on run order between the two lanes.

Finding (posted inline, SUGGESTION)

.github/workflows/intake-triage.yml:519 — the new floor-add branch calls addLabels for FLOOR_LABEL without rechecking the label still exists immediately before the write. Its only liveness check happens once, in the compose step, several minutes earlier (intake-triage.yml:233-236). addLabels doesn't 404 on an unknown label — it silently auto-creates a bare one — which the PR's own sibling workflow explicitly guards against with a getLabel-first, fail-closed pattern (intake-label-needs-triage.yml:139-153). Confirmed novel to this commit via git diff (earlier commits only ever called removeLabel for the floor label) and verified independently by a second agent. Low severity: FLOOR_LABEL is trusted workflow input, never model-controlled, so there's no attacker-controlled trigger — this needs an admin deleting/renaming the label mid-run, and the impact is a cosmetic, unreviewed label recreated with the same name.

Checked and found sound

  • The "none"-sentinel collision both prior reviews flagged is closed. Issue Type filtering now excludes any type whose name, trimmed and lowercased, equals "none" (intake-triage.yml:247-251), so the sentinel can no longer collide with an admin-named type (case or whitespace variants included) — matches the new "compose drops an Issue Type that collides with the none sentinel" test.
  • The floor-labeler race Codex flagged is closed. intake-label-needs-triage.yml now reads live labels via listLabelsOnIssue instead of the stale opened event payload, and separately skips when the issue already carries the human-routing label (intake-label-needs-triage.yml:109-137). intake-triage.yml closes the other half by re-adding the floor itself whenever the triage didn't confidently clear it (intake-triage.yml:503-525), so the final state no longer depends on which lane finishes first.
  • Floor label is validated and admission-guarded at compose time. floor-label is rejected if it's an admission label (agent-ready/work-class:*, same rule as escalation-label) and cleared to "" (turning floor handling off) if it doesn't exist in the repository (intake-triage.yml:228-236) — FLOOR_LABEL still never originates from model output.
  • No new injection surface. No new GraphQL/shell-argument construction was introduced in this increment; the only new REST write (addLabels for the floor) uses a trusted, enum-independent string.
  • Fail-safe ordering preserved under the new typeFailure split. A failed Issue Type write no longer aborts the job before the floor logic runs, but it still can't cause a floor removal: the remove branch requires typeSet to be truthy, which a failed write never sets, so a type-write failure always falls into the add-the-floor-back branch instead (intake-triage.yml:491-525) — confirmed against the new "a failed type write still adds the floor and fails the job" test.

No CRITICAL or IMPORTANT findings in this incremental diff.
· Branch

Comment thread .github/workflows/intake-triage.yml Resolved
Comment thread .github/workflows/intake-triage.yml Resolved
addLabels creates an unknown label, so the lane now fetches the floor
label right before adding it and skips with a warning on a 404, the same
fail-closed check intake-label-needs-triage uses. The summary reports the
floor as removed only after a remove that succeeded, not after a
swallowed 404.

Refs: #662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 19s —— View job


Security review (/review:security-review)

  • Gather context (incremental diff since 7558a3f, PR body, prior findings)
  • Read .claude-lane/incremental.diff
  • Review .github/workflows/intake-triage.yml changes since 7558a3f
  • Review .github/scripts/intake-triage-apply.test.cjs changes since 7558a3f
  • Adversarially verify candidate findings
  • Post findings and summary

Scope

Incremental review of commit 02c0fa2 against the last-reviewed commit 7558a3f, restricted to what changed: .github/workflows/intake-triage.yml and .github/scripts/intake-triage-apply.test.cjs. This commit fixes the two issues this lane and the code-review lane both flagged on 7558a3f: floorCleared was being set even when removeLabel 404'd (floor already absent), and the floor-add path recreated a deleted floor-label via addLabels's auto-create behavior with no recheck immediately before the write.

Findings

None. Both prior findings are closed, correctly and without introducing a new gap:

  • floorCleared overstatement — fixed. intake-triage.yml:511-517: floorCleared = true now sits inside the inner try, immediately after the successful await removeLabel(...) call, instead of after the try/catch block. A caught 404 (floor label already absent — a prior run already cleared it, or it was removed manually) now correctly leaves floorCleared false, so the job summary's - Floor label: line reports "unchanged" rather than falsely claiming "removed". Verified against the new "a floor already gone is not reported as removed" test by tracing both the no-404 and 404 branches by hand.
  • Floor-label auto-create on a deleted label — fixed. intake-triage.yml:519-533: the add path now calls getLabel immediately before addLabels, matching the fail-closed pattern intake-label-needs-triage.yml already uses for the same reason (addLabels silently creates an unknown label rather than 404ing). A getLabel 404 sets exists = false, warns ("no longer exists; not adding it"), and skips the addLabels call entirely — closing the gap where a floor label deleted or renamed mid-run could get silently recreated as a bare, unreviewed label. A non-404 getLabel error still rethrows into the outer catch (failure = error), preserving fail-closed behavior for unexpected API errors. Verified against the new "a floor label deleted since compose is not created" test.
  • A residual check-then-act gap remains between the getLabel read and the addLabels write (the label could theoretically be deleted in that narrow window), but FLOOR_LABEL is trusted workflow input, never model- or issue-author-controlled, so this isn't attacker-reachable — it's the same inherent, non-exploitable TOCTOU window the sibling workflow's identical pattern already accepts, not a new finding.
  • No new injection, authorization, or token-handling surface: no new GraphQL/shell-argument construction, no new write path reachable from model output, and permissions: is unchanged.

No CRITICAL, IMPORTANT, or SUGGESTION findings in this incremental diff.
· Branch

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 44s —— View job


Code review complete

  • Gather context (incremental diff, REVIEW.md, standards)
  • Review changes since 7558a3f in .github/workflows/intake-triage.yml
  • Review changes since 7558a3f in .github/scripts/intake-triage-apply.test.cjs
  • Adversarially verify candidate findings
  • Post findings and summary

Scope: incremental review of HEAD 02c0fa2, limited to what changed since the last review of 7558a3f, per REVIEW.md splitting security findings to the dedicated security lane. This commit is a direct fix for the two findings this lane and the security lane both posted against 7558a3f:

  1. floorCleared = true is now set immediately after the successful await removeLabel(...), inside the inner try, instead of unconditionally after the try/catch — so a caught 404 (floor already absent) no longer reports "removed".
  2. The floor-add branch now calls getLabel immediately before addLabels, mirroring the sibling intake-label-needs-triage.yml's fail-closed pattern, so a floor label deleted/renamed during the run's live window is no longer silently auto-created.

Findings

None. I traced both changed branches in intake-triage.yml:511-528 by hand:

  • Remove branch: floorCleared is only reachable as true via a successful removeLabel call; a 404 is still swallowed (error.status !== 404 check unchanged) but no longer sets the flag, so the summary's Floor label: line now correctly reports "unchanged" instead of "removed" when nothing was removed.
  • Add branch: a non-404 getLabel error still propagates to the outer catch and sets failure, consistent with every other API-failure path in this step. A 404 now warns ("no longer exists; not adding it") and skips the addLabels call entirely, so floorAdded stays false and no bare, unreviewed label gets recreated.

Both new tests exercise exactly the previously-missing cases: "a floor label deleted since compose is not created" (getLabel 404 → no addLabels call, warning present, no failure) and "a floor already gone is not reported as removed" (removeLabel 404 → summary says "unchanged", not "removed"), and the pre-existing "a failed type write still adds the floor and fails the job" test (which hits the add branch with the label present) continues to pass under the new getLabel-gated logic since its mock's getLabel succeeds by default. I could not run node --test in this environment (no shell-execution approval for that command), so I verified by tracing the mock wiring (floorDeleted/floorAbsent options and the getLabel/removeLabel mocks added in this diff) against the implementation by hand rather than by executing the suite.

No other lines changed in this increment, and no new injection, correctness, or test-gap issues found.
· Branch

@kyle-sexton
kyle-sexton merged commit 182aca3 into main Oct 12, 2026
29 checks passed
@kyle-sexton
kyle-sexton deleted the feat/intake-triage-issue-type branch October 12, 2026 20:04
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 12, 2026
No related issue: runner-policy contract for ci-workflows v0.42.0
(ci-workflows#741)

## Summary

Lets callers pin the intake lanes at ci-workflows v0.42.0, where the
triage lane sets the Issue Type and clears the `needs-triage` floor
(melodic-software/ci-workflows#741).

## Fix

`components/runner-policy/policy.json` gains two contracts at
`182aca3ad32b79fd002def94e58eb498ac49e7af` (v0.42.0), each its v0.39.8
entry plus the one new input:

| Reusable | New input (default) | Secrets | Caller permissions |
| --- | --- | --- | --- |
| `intake-triage.yml` | `floor-label` (`needs-triage`) |
`CLAUDE_CODE_OAUTH_TOKEN`, unchanged | `contents: read`, `issues:
write`, unchanged |
| `intake-label-needs-triage.yml` | `human-label` (`needs-human`) |
none, unchanged | `issues: write`, unchanged |

`claude-args` exists on `intake-triage.yml` at both tags but stays out
of `allowedInputs`, matching the v0.39.8 entry. The README gains a
rollout note, and `runner-policy.test.mjs` asserts each v0.42.0 entry is
its v0.39.8 entry plus that input and that exactly two v0.42.0 keys
exist. `fixtures/historical-contracts.json` is unchanged: it holds
retired contracts only.

## Verification

- Parsed `on.workflow_call` (inputs, secrets), workflow `permissions`
and job `permissions` of both files at `594987a` (v0.39.8) and `182aca3`
(v0.42.0): only the two inputs differ. The new steps use the job's
existing `github.token`; no `uses:`, secret or permission is added.
- `npm run test:runner-policy`: 301/301 pass.
- `npm run lint:runner-policy`: "Runner policy passed."
- lefthook pre-commit (typos, editorconfig, markdownlint, gitleaks,
biome): pass.

## Related

- melodic-software/ci-workflows#741
- Precedent: #762 (v0.39.8 contracts)
- Consumer repin: melodic-software/claude-code-plugins (draft, follows)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01W6SjPvY7DmXBGzboeCq8nj

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant