Skip to content

fix(intake-triage): keep an existing Issue Type and retry a clean triage that hit a denial - #887

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/intake-keep-existing-type
Oct 25, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/intake-keep-existing-type

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

No related issue: defects reported by the Issue Triage session (owner rule: fix in place, no new issues).

Summary

Two intake defects in the apply job:

  1. It set the model's Issue Type on every usable triage, replacing a type a maintainer had already set. On claude-code-plugins#9982 a maintainer set Task at 11:00:46Z and github-actions changed it to Feature at 11:01:59Z (issue timeline); admission then refused it as a parentless Feature. Also seen on #6761, #7571 and #9942.
  2. One permission denial turned a complete, clean verdict that asked for no person into a bare needs-human hand-off. The owner decided (2026-10-25, via the Issue Triage session) that such a run applies nothing so the caller's sweep retries it.

Fix

  • An existing type (type.name on the REST issue the job already fetches) is kept and counts as typed for the floor-label removal.
  • A permission denial on an otherwise clean triage (success, usable output, needs_human false, no other escalation reason) applies nothing and escalates nothing. A new workflow output, triage-deferred: 'true', lets a caller skip a step that reads the lane comment.
  • The extract steps log each denied tool and its input inside ::stop-commands:: with a per-run random token, with control characters replaced and credential-shaped strings redacted. The runner also parses the legacy ##[command] form anywhere in a line (actions/runner src/Runner.Common/ActionCommand.cs TryParse), so neutralizing :: alone would not stop model-chosen input from issuing a command; stop-commands is GitHub's documented way to log text without running commands.

Verification

  • node --test .github/scripts/intake-triage-apply.test.cjs: 58 pass. The existing-type test fails on main's workflow; the log test feeds ::error:: and ##[add-mask] payloads and asserts they sit inside the stop-commands block with the credential redacted.
  • Related suites (report-lane-outcome, install isolation, needs-triage label, gate, legs, outcome emitters): 126 pass.
  • The REST issue schema documents type as a nullable object with name.

Related

  • claude-code-plugins#9982. The claude-code-plugins repin gates its apply-verdict job on triage-deferred != 'true'; without that, a deferred run would throw in apply-verdict ("this run's triage wrote none").

🤖 Generated with Claude Code

The apply job set the model's type on every usable triage, so it replaced
a type a maintainer had already chosen (claude-code-plugins#9982: Task set
by hand, changed to Feature a minute later, then refused by admission as a
parentless Feature). An existing type now stays and counts as typed for
the floor-label removal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018CEuXyf8rf9oWJWecskiuF
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-25T14:22:48.664889Z 159d56d PR opened
ℹ️ 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 25, 2026 •

Copy link
Copy Markdown

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


Security review

  • Gather context (PR diff, changed files)
  • Review .github/workflows/intake-triage.yml changes
  • Review .github/scripts/intake-triage-apply.test.cjs changes
  • Check for trusted-path / manifest hits
  • Post final findings

Scope: only .github/workflows/intake-triage.yml (apply job logic) and its test file .github/scripts/intake-triage-apply.test.cjs. No .claude-plugin/plugin.json, .claude-plugin/marketplace.json, CLAUDE.md/AGENTS.md, or trusted-path files (.github/standards/trusted-actors/**, .github/actions/check-trusted-trigger/**, CODEOWNERS, .gitmodules) are touched.

Finding: none. The change (intake-triage.yml diff) reads issue.type?.name from the already-fetched REST issue and, when set, skips the updateIssue GraphQL mutation and treats that existing type as satisfying the floor-label condition. Issue Types are an enum-like field that only users with triage/write access can set on a repo issue — it is not free text an arbitrary issue author or commenter can inject — so this introduces no new injection surface, no authorization gap, and no change to permissions or trust boundaries. The value only ever feeds a string-equality check and a job-summary log line (core.summary), never a shell command, query, or file path. Logic is well covered by the two new tests (usable run keeps an existing type / unusable run keeps the floor).

No GitHub Actions hardening concerns either (no trigger, permissions:, or action-pin changes in this diff).

critical-findings: 0

claude-lane-summary: lane=claude-security-review sha=159d56d0f98b852f2f606c787910cef1efbe0158 run=40201838246
· Branch

@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 15s —— View job


Code review

  • Gather context (diff, workflow surroundings, test file, repo rules)
  • Check the fix's logic against the bug it describes
  • Check test coverage for both new branches (existing type + usable, existing type + unusable)
  • Check path-scoped rules (.claude/rules/pr-body-contract.md has no paths: frontmatter, so it isn't file-scoped criteria here) and paved paths (no standards index found in this checkout)
  • Post findings

Summary

No findings. The fix is scoped correctly:

  • existingType is read from the REST issue object already fetched earlier in the same job (intake-triage.yml#L1464-L1465), so it reflects the issue's current state at apply time, not a stale value captured during the model's run — this directly addresses the race described in the PR body (maintainer sets a type, then the lane overwrites it).
  • The new typeSet initializer (!failure && usable && existingType ? existingType : "") and the guard added to the mutation's if (!existingType) correctly gate the "keep existing" behavior to only the usable case. An existing type on an unusable run (e.g., type: "none", which has no entry in types) correctly leaves typeSet empty and the floor label untouched — the second new test (intake-triage-apply.test.cjs new test, "an existing type on an unusable run keeps the floor") confirms this, matching the stated "with no existing type, behavior is unchanged" and extending that same restraint to "existing type but unusable triage."
  • The two new tests exercise both branches the change introduces and pass by inspection against the mock github.rest.issues.get returning type: existingType ? { name: existingType } : null — consistent with the real REST shape the PR verified via gh api … --jq .type.name.
  • I could not execute node --test in this sandboxed review environment (command execution required approval I couldn't grant), so the PR's claimed 55/55 pass count is author-claimed and unverified by me; the logic read-through above is independent of that claim.

No correctness, test-coverage, or maintainability issues found in the two changed files. Nothing security-relevant in scope (no auth/privilege/injection surface touched).

claude-lane-summary: lane=claude-review sha=159d56d0f98b852f2f606c787910cef1efbe0158 run=40201838246

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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

kyle-sexton and others added 3 commits October 25, 2026 10:25
A single permission denial turned a complete, clean verdict that asked for
no person into a needs-human hand-off (6 of 8 bare hand-offs traced). Such
a run now applies nothing and escalates nothing, so the caller's triage
sweep retries it within its attempt bound; a verdict that asks for a
person, or any other escalation reason, still escalates. The extract step
logs each denied tool and its input with control characters, workflow
commands and credential-shaped strings neutralized. Owner decision via the
Issue Triage session, 2026-10-25.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018CEuXyf8rf9oWJWecskiuF
…dict step

A deferred triage writes no lane comment, so a caller step that reads the
comment (claude-code-plugins apply-verdict) would throw and turn the run
red. The workflow now outputs triage-deferred: 'true' for that case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018CEuXyf8rf9oWJWecskiuF
The runner also parses the legacy ##[command] form anywhere in a line (actions/runner src/Runner.Common/ActionCommand.cs TryParse), so neutralizing :: alone let model-chosen tool input issue ##[add-mask] or ##[error]. The denial lines now sit inside ::stop-commands:: with a per-run random token, the documented way to log text without running workflow commands.

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

Claude-Session: https://claude.ai/code/session_018CEuXyf8rf9oWJWecskiuF
@kyle-sexton kyle-sexton changed the title fix(intake-triage): keep an Issue Type the issue already has fix(intake-triage): keep an existing Issue Type and retry a clean triage that hit a denial Oct 25, 2026
@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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


Security review

  • Read the incremental diff (.claude-lane/incremental.diff, 159d56d → ad7755e)
  • Read surrounding context in .github/workflows/intake-triage.yml
  • Review the new stop-commands / redaction logging
  • Review the new deferred output and defer-on-permission-denial logic
  • Review test file changes
  • Post findings

Summary

Incremental review covering the 3 commits since this lane's last pass (159d56d): the denied-tool-call logging (.github/workflows/intake-triage.yml, both the claude and subscription jobs), the new deferred output / defer-on-clean-permission-denial logic in the apply job, and the matching test additions in .github/scripts/intake-triage-apply.test.cjs. No .claude-plugin/* or trusted-path files are touched in this window.

Denied-tool-call logging (new): correctly implemented. tool_name/tool_input are model-chosen and now logged via core.info, wrapped in a runtime-random ::stop-commands::<token> / ::<token>:: pair that suppresses GitHub Actions workflow-command parsing (both the ::...:: and legacy ##[ forms) for that line, with credential-shaped substrings redacted first and control characters stripped so the payload can't inject a literal newline to start a new, unprotected log line. Verified independently by a dispatched verifier against the real code path and the new test — no bypass found.

Defer-on-permission-denial (new, intake-triage.yml#L1588): flagged as a SUGGESTION inline comment, not a blocker. When a permission denial is the sole reason a run would otherwise escalate, the lane now applies nothing and defers for a retry instead of forcing the escalation label. A permission denial is also the signal that the model attempted a disallowed tool call — plausibly a prompt-injection attempt — so this trades some of that detection signal for less noise on benign denials. The retry bound that's supposed to eventually force escalation lives in the consuming repo's "triage sweep," outside this diff, so this file alone can't confirm it exists or that it re-escalates on exhaustion rather than silently dropping the issue. Worth a maintainer confirming that contract holds on the caller side.

No GitHub Actions hardening issues (no trigger/permissions:/pin changes in this window), no manifest changes to flag.

critical-findings: 0
· Branch

claude-lane-summary: lane=claude-security-review sha=ad7755ea0a439d5d752de957a71cdec132b6ce6d run=40204062534

@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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


Code review

  • Read the incremental diff (.claude-lane/incremental.diff) covering the 3 commits since this lane's last review (159d56d)
  • Read the surrounding workflow logic (the apply job's escalation/defer branch, the two "Extract" steps) for context
  • Check the new permission-denial-defer logic against its stated intent and tests
  • Check .claude/rules/pr-body-contract.md (no paths: frontmatter — not file-scoped criteria here, consistent with this lane's prior review) and the standards index (docs/standards/README.md, no paved-path row — nothing to apply)
  • Post findings

Summary

Reviewed only what changed since 159d56d: the permission-denial-defer branch in the apply job, the new triage-deferred workflow output, and the denied-tool logging added to both model jobs' extract steps.

The defer logic (escalate.length === 1 && denials > 0 && subtype === "success" && pick("ERROR") !== "true" && output && !output.needs_human) is correctly gated: any other escalation reason (needs-human, a credential-shaped comment, a non-success subtype, no usable output) pushes a second escalate entry and forces normal escalation, and the branch returns before any label/comment/type mutation runs. The three new tests in intake-triage-apply.test.cjs exercise exactly those branches (clean defer, defer-with-needs-human escalates, defer-with-credential escalates) and match the implementation by inspection. The denied-tool-and-input logging duplicated into both the claude and subscription jobs' extract steps keeps the byte-for-byte parity intake-triage-legs.test.cjs's existing cross-job test enforces, so the duplication is intentional, not drift.

One finding, posted inline: the new triage-deferred output's two-hop YAML wiring (workflow_call.outputs → job outputs → step output) has no test, unlike the project's own precedent for failure-class. See the inline comment on .github/workflows/intake-triage.yml#L268.

I could not run node --test in this sandbox (command execution needs approval I couldn't grant); the PR's claimed 55/55 pass count is author-claimed and unverified by me. My read-through above is independent of that claim.

claude-lane-summary: lane=claude-review sha=ad7755ea0a439d5d752de957a71cdec132b6ce6d run=40204062534
· Branch

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

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 25s —— View job


Security review (incremental: ad7755e → 8ee5cdc)

  • Read .claude-lane/incremental.diff (scope: .github/scripts/intake-triage-apply.test.cjs only)
  • Confirm no other file changed in this window
  • Check for security-relevant surface
  • Post findings

Summary

The only change since ad7755e is in the test file .github/scripts/intake-triage-apply.test.cjs:

  • Reformatting (line wraps) of two existing tests — no behavior change.
  • One new test added, "triage-deferred reaches the caller from the apply step's deferred output", which asserts the workflow_call.outputs.triage-deferred.value → jobs.apply.outputs.deferred → steps.apply.outputs.deferred wiring — this is exactly the coverage gap flagged in my prior inline comment on intake-triage.yml#L268.

No workflow, action, or non-test source file changed in this window. This is a test-only diff with no security-relevant surface (skip gate item 2) — no injection, authorization, secret-handling, or trust-boundary surface to review.

Finding: none.

critical-findings: 0
· Branch

claude-lane-summary: lane=claude-security-review sha=8ee5cdc85f4d9ea3cf632db3fd6b4e7b0207acf9 run=40204790117

@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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


Code review

  • Read the incremental diff (.claude-lane/incremental.diff, ad7755e → 8ee5cdc), scoped to .github/scripts/intake-triage-apply.test.cjs
  • Check path-scoped rules (.claude/rules/pr-body-contract.md has no paths: frontmatter — not file-scoped criteria here) and the standards index (no paved-path row)
  • Review the test changes for correctness and coverage
  • Post findings

Summary

This increment is almost entirely a formatting pass (the test file's existing lines re-wrapped, no behavior change) plus one new test:

test("triage-deferred reaches the caller from the apply step's deferred output", () => {
  assert.equal(workflow.on.workflow_call.outputs["triage-deferred"].value, "${{ jobs.apply.outputs.deferred }}");
  assert.equal(workflow.jobs.apply.outputs.deferred, "${{ steps.apply.outputs.deferred }}");
  assert.equal(applyStep.id, "apply");
});

This directly closes the test-coverage gap I flagged in this lane's prior review on this PR (the two-hop output wiring at ad7755e's intake-triage.yml#L260-L268): the wire from on.workflow_call.outputs.triage-deferred.value → jobs.apply.outputs.deferred → steps.apply.outputs.deferred now has an assertion at each hop, mirroring the project's existing failure-class precedent.

I checked the three asserted values against the current workflow file and they match the real wiring exactly:

A typo at either hop would now fail this test rather than silently resolving to an empty string, so the gap is closed correctly.

I could not run node --test in this sandbox (command execution needs approval I couldn't grant); the above is a read-through/by-inspection check of the new assertions against the workflow file, not an executed test run.

No new findings in this increment.

claude-lane-summary: lane=claude-review sha=8ee5cdc85f4d9ea3cf632db3fd6b4e7b0207acf9 run=40204790117
· Branch

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit 215cec5 Oct 25, 2026
30 checks passed
@kyle-sexton
kyle-sexton deleted the fix/intake-keep-existing-type branch October 25, 2026 15:04
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 25, 2026
… contract (#879)

Refs: melodic-software/ci-workflows#887

## Summary

Registers the `intake-triage.yml` reusable-workflow contract at
ci-workflows

[v0.65.10](https://github.com/melodic-software/ci-workflows/releases/tag/v0.65.10)
(`215cec5c362f953f8b6196effb04451696c3f970`), so claude-code-plugins can
repin
its intake caller from `b0ecc273abe492d12f2efa98ee4741a84c219ed2` and
pass
runner-policy.

## Fix

- Copies the `intake`-role entry at
`@b0ecc273abe492d12f2efa98ee4741a84c219ed2`
forward verbatim in `components/runner-policy/policy.json`. The b0ecc27
and
  earlier entries stay as history.
- Adds the matching copy-forward test in `runner-policy.test.mjs` and a
  rollout line in the component README.
- v0.65.10
([ci-workflows#887](melodic-software/ci-workflows#887))
keeps an existing Issue Type, applies nothing on a permission denial
over an
otherwise clean triage, adds the `triage-deferred` workflow_call output,
and
logs denied tools inside `::stop-commands::`. `git diff b0ecc27 215cec5
--
  .github/workflows/intake-triage.yml` changes no input, secret or job
  permission.

## Verification

- `node --test components/runner-policy/runner-policy.test.mjs`: 352
pass, 0 fail.
- `node components/runner-policy/runner-policy.mjs --root <worktree>`:
Runner policy passed.
- `biome ci` on the two changed code files and `markdownlint-cli2` on
the README: clean.

## Related

-
[melodic-software/ci-workflows#887](melodic-software/ci-workflows#887)
(released as v0.65.10)
- [#863](#863) (the
b0ecc27 intake-role contract)
- Next: the standards sync into claude-code-plugins, then its intake
caller repin.

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

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