Skip to content

fix(intake-triage): say why a size split declines, and split by target subset - #11163

Merged
kyle-sexton merged 28 commits into
mainfrom
fix/intake-size-split-runs
Oct 30, 2026
Merged

kyle-sexton merged 28 commits into
mainfrom
fix/intake-size-split-runs

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

No related issue: owner decision Q93 follow-up; 19 Large issues parked silently

Summary

A Size Large issue whose split was declined stayed parked at status: ready, and the reason was written only to a workflow step summary. 19 of 25 open Large issues were in that state. A trusted split sub-issue rated Large was admitted, but the issue lane then held it as split-required.

This change:

  • makes every lasting decline visible on the issue;
  • adds a target-subset split for criteria that repeat over named targets;
  • moves the split settings into configuration;
  • runs a trusted split child rated Large on a configured budget.

Fix

  • Visible decline: each lasting decline posts one fixed-text lanes App comment that names the reason, and adds no hold label. A marker per reason and body version keeps a re-run from posting it again. The reason codes:

    • not-human: a listed human did not file the issue.
    • few-lines: fewer than 2 trusted task-list lines, even after refinement.
    • no-split, bad-split, bad-subset: no valid split by line or by target.
    • no-type: an Issue Type that admission does not take.

    A decline found at select time reaches apply-refinement as mode size-decline. No model runs, and no token scope or permission changes.

  • Refinement first: an issue with fewer than 2 trusted task lines gets the existing thin refinement first (owner Q78). The split then runs on the refined lines at the next triage.

  • Target-subset split: when the lines cannot be grouped into whole changes, the model may return groups of target names copied verbatim from the trusted lines. Each sub-issue then holds every line plus one last Scope: line. Its header says that the lines are copied from the parent and that the Scope line names this part's targets.

    • splitChildBody accepts the Scope line only under that header, and only when every target in it is verbatim parent text.
    • pr-verify and the issue lane call splitChildBody, so they apply the same rule.
    • The babysit merge gate's Python mirror carries the same rule.
    • Both prompt copies and both schema copies changed together.
    • subsetProblem refuses groups that the split record cannot hold (it round-trips them through renderSplitRecord and splitRecord). It also refuses a target that sits inside another target, a target holding @ or #, and groups that leave a task line without a target. Targets are matched against the line text after its checkbox.
    • Resuming a target-subset record also requires every part to hold every line, so an edited record skips instead of orphaning lines.
  • Scope narrows the criteria: splitScope (admit.mjs) reads an accepted child's Scope line. The issue lane passes it as scope in issue.json, and pr-verify passes it in the child's spec entry. The work skill and the pr-verify prompt apply each criterion only to those targets. With no scope, every criterion applies.

  • Configuration: admission-rules.json gains size-split:

    • on-decline: subset or park, default subset.
    • max-parts: 10.

    This replaces the MAX_PARTS constant and the hard-coded item limits in the schema.

  • Split child rated Large: pr-pipeline.yaml gains models.issue-dimensions.split-child-size: medium.

    • resolve-config reads a splitChild fact through admit.mjs trustedSplitChild, which applies splitChildBody against the native parent. The fact is read only while the dimensions are not yet pinned.
    • A trusted child rated with a split size resolves as that configured size, and the pin carries it into the run job.
    • Any other Large issue still skips with split-required.
    • The schema and checkDimensions refuse a split-child-size that names no size that runs.
  • Docs: the pr-pipeline README (Models) and pr-run-activity.md describe declines, target-subset splits, size-split and split-child-size. Changelog fragments were added for pr-pipeline and source-control.

Verification

  • node --test over .github/scripts/intake-triage, .github/scripts/pr-verify, .github/scripts/work-resolve-issue and .github/actions/resolve-config (*.test.mjs in each): all pass. Each new test failed before its change.
  • The split-child vectors gained 8 Scope and header cases. admit.test.mjs, resolve-pr.test.mjs and the babysit test_babysit_split_child_trust.py all read them. Each suite failed before the fix and passes after it.
  • actionlint .github/workflows/intake-triage.yml: clean.
  • python3 -I scripts/sync-hold-floor.py --check: clean.
  • scripts/check-changelog-fragments.sh --check: all fragments valid.
  • scripts/check-affected.sh: 14 passed, 1 skipped.
  • After two independent review rounds (0 CRITICAL/HIGH; 3 IMPORTANT, then 2 IMPORTANT and 4 MINOR, all fixed with red-then-green tests): admit and refine 488 pass, resolve-pr 123, write-issue 41, and the Python split-child suite 18 OK.
  • The evidence for the change comes from a local exploration and research pass over the parked issues and the split code. It is kept outside the repository.

Related

  • Owner decisions: Q93 (split large work at intake) and Q78 (the refinement counts as spec).
  • Not in this change: the poteto repository's Python mirror of the split-child vectors needs the same Scope and header rule.

🤖 Generated with Claude Code

kyle-sexton and others added 26 commits October 29, 2026 23:44
…lane

The loop-lane README moved to docs/contracts/loop-lane; three comments in
admit.mjs and admit.test.mjs still named the old path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
splitChildBody, its pr-verify and issue-lane callers, and the babysit merge
gate's mirror now accept one last `Scope:` line on a size-split sub-issue
when every target it names is verbatim text of a trusted parent task line.
The split record carries a target-subset split's groups for resume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Size Large issue whose split was declined stayed parked with the reason
only in a step summary. Now:

- Every lasting decline (author not a listed human, fewer than 2 trusted
  lines after refinement, no split found, an invalid partition or target
  split, an Issue Type admission refuses) posts one fixed-text lanes App
  comment, marked per reason and body version, with no hold label.
  refine-select hands a select-time decline to apply-refinement as mode
  size-decline, so no new token or permission is needed.
- An issue with fewer than 2 trusted task lines gets the thin refinement
  first (owner Q78), and the split runs on the refined lines.
- When lines cannot be grouped into whole changes, the model may return
  groups of target names copied from the lines; each sub-issue holds every
  line plus one Scope line, which splitChildBody trusts.
- admission-rules.json size-split holds on-decline (subset or park) and
  max-parts, replacing the MAX_PARTS constant and the schema's hard limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-size

Admission takes a trusted size-split sub-issue whatever its Size (owner
Q93), but the issue lane skipped one rated Large as split-required, so it
sat held for good. models.issue-dimensions.split-child-size (medium) now
gives such a child that size's budget, pinned as that size; any other
Large issue still skips with split-required. resolve-config reads the
splitChild fact through admit.mjs trustedSplitChild, which applies
splitChildBody against the issue's native parent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its targets

A target-subset sub-issue said its done-when was copied as written while
it also held the script's Scope line. Its header now says the lines are
copied from the parent and the Scope line names this part's targets, and
splitChildBody (with the merge gate's mirror) requires that header with a
Scope line and refuses it without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and split-child-size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… or that leave a line uncovered

subsetProblem now requires every task-list line to hold one of the
targets, and the groups to come back from renderSplitRecord through
splitRecord, so the record's groups cap and its parser stay one source
and an oversized split never leaves an unreadable record behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… admit.mjs does

scope_target now measures UTF-16 code units and strips only what
JavaScript trim strips; two shared vectors pin the agreement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er line

splitRecord reads a record only under SIZE_SPLIT_MARKER, so subsetProblem
renders the marker before parsing back the groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… line's targets

admit.mjs splitScope is the one parser of a trusted split child's Scope
line. write-issue.mjs puts its targets in issue.json as `scope` and
resolve-pr.mjs in the child's spec entry; the work skill and the pr-verify
prompt read each done-when item as applying only to those targets. Only a
body splitChildBody trusts is parsed, so with no readable Scope line every
item applies in full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pe field

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SPACE

JS_TRIM held the same characters as JS_SPACE, so scope_target now uses
JS_SPACE and the duplicate constant is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t.mjs does

scope_target encoded the target as strict UTF-16, which raises on a lone
surrogate that a JavaScript string can hold; surrogatepass counts it as
one code unit, as scopeTarget does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r sign

A target copied from a line such as "Email @contoso about #1234" could be
"@contoso" or "#12", which writes a new mention or issue link into the
App-filed child body. scopeTarget and the Python scope_target now ban both
characters, with a shared vector for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rker

A target such as "- [ ]" is a substring of every task line, so it passed
scopeTarget and alone covered every line. scopeTarget, the split's
coverage check and the Python scope_target now match against each line's
text after its indent and task-list marker (taskText), with a shared
vector for the marker as a target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
subsetProblem deduplicated only identical targets, so "alpha" and
"alpha-tools" passed as two groups and both children owned the alpha-tools
work. It now refuses any target that is text inside another target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…very line per group

The resume path checked a record with groups only through subsetProblem,
never that its parts are every line once per group. An edited record
(parts 1;1) orphaned lines, and parts longer than the groups threw a
TypeError at record.groups[index] on every rerun. Such a record now takes
the existing "no longer matches" skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enforces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…admit.mjs

resolve-config.mjs is a hold-floor module; importing intake's admit.mjs
pulled its whole import closure into the floor and broke the merge-holds
sync test. work-resolve-issue's admit job (check-blockers.mjs, which
already loads admit.mjs) now reads trustedSplitChild and hands it to the
dimensions resolve as the split-child input. resolve-config refuses any
value but true or false when it reads the issue's dimensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lve too

run-checks resolves with no activity, so it reads the unpinned issue dimensions and needs the fact resolve-config now takes only from its caller; without it every issue run failed run-checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 06:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-30T06:40:34.002707Z cdae966 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.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0f847e9b30ca48f55d2f53ea8b0171f420aec2e8: 0 finding(s), 0 as inline comments.

No security findings in this change.

critical-findings: 0

I read the whole diff (32 files). The PR context was treated as data. It holds no embedded instructions.

Trust controls and trusted paths

  • resolve-config (split-child input, splitChild fact, splitChildDims, checkDimensions): no widening. The fact comes from the workflow's own admit job output, which calls trustedSplitChild. That function needs all of the following:
    • the lanes App (matching bot id) authored the issue body;
    • the body starts with SPLIT_CHILD_MARKER;
    • the native parent is human-written;
    • splitChildBody accepts the body against the parent.
      A missing or malformed value makes resolve-config throw, so it fails closed. The token scope the broker mints is unchanged. The split-child-size: medium setting only changes the size a trusted child resolves to. It adds no token scope and no new actor. The effect is that a Large trusted child runs instead of stopping at split-required, which spends prepaid credits only (not a hold).
  • splitChildBody Scope line (admit.mjs) and its Python mirror in babysit_verify_evidence.py: this is not a weakened hold. The Scope line is accepted only when the header wording says it is scoped. Every target must be a scopeTarget: 2 to 100 characters, no , < > \ @ # CR LF`, and verbatim text of a trusted parent line. Targets must not repeat. At least one task line must remain. The JS and Python rules match on length in UTF-16 units, outer-space stripping, the banned characters and the substring test. A hand-edited child fails the existing exact-line and edit checks.
  • Scope narrowing criteria (splitScope, pr-verify scope, work-lane scope): scope is derived only from a body that splitChildBody already accepted, and only for App-authored children. An outsider cannot write a Scope line that narrows a gate, because the child body must be the App's own text.
  • Decline comments (postDecline, applySizeDecline): the comment text is fixed. The reason code is checked against the DECLINES allow-list and nothing from the model or issue text is rendered. The comment is posted only if the issue is open, is not a PR, and has the same body as when select ran. The marker is per reason and body version. No label is added and the token scope is unchanged. The refine-issue and refine-issue-subscription jobs are skipped in size-decline mode, and apply-refinement skips the refinement download. So no model runs and no model output reaches the credentialed apply step in that mode.
  • Model-controlled groups (target-subset split): the output is schema-constrained and re-validated by subsetProblem. Targets must be verbatim, non-nested substrings of trusted lines, must cover every line, and the groups must survive a renderSplitRecord to splitRecord round trip. On resume, a stored record is re-validated, and each part must hold every line. Names reach the record comment and the renderSplit markdown only after the banned-character filter, and inside code spans.
  • Few-lines path to thin refinement: this runs only after the humans.has(issue.user.id) check, so only a listed human's issue reaches it. The existing refinement guards still apply.
  • Schema maxItems removal in the prompt schemas: partitionProblem and subsetProblem enforce max-parts from admission-rules.json in the script, so the model's output size is not trusted.

Manifests and instruction surfaces

  • No plugin.json or marketplace.json change, so there are no manifest <field> lines.
  • work/SKILL.md and pr-verify/prompt.md add scope wording. Nothing is deleted or softened. A scope only appears on a body the scripts have already validated.

Spend: more issue-lane runs for trusted Large children (at medium), and no model runs for declines. This uses prepaid credits or subscription usage only. It is not a hold and not counted.

Residual notes, not findings:

  • If write-issue.mjs later rejects a child's parent (for example, a parent edited after the label), the run goes ahead at medium size without split_parent. That is an availability and quality edge, not an authorization gap.
  • The poteto repository's Python mirror of the split-child vectors still needs the same Scope rule, as the PR description says. It is outside this repository.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on cdae9660f075af932dd23246c93c880d16c3e2a3; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 0f847e9b30ca48f55d2f53ea8b0171f420aec2e8: 0 finding(s), 0 as inline comments.

No blocking or advisory findings in this review of #11163. I read the whole diff apart from the new test vectors in split-child.vectors.json, which I only skimmed. I could not run any tests: this session had no shell, so the pass claims in the PR description are author-claimed and unverified by me.

What I checked

  • Scope rule: the JS rule in splitChildBody, scopeTarget, taskText and splitScope (admit.mjs) and the Python mirror in babysit_verify_evidence.py match. They agree on the scoped-header test, last-line pop, duplicate refusal, banned characters, the 2–100 length (UTF-16 units), outer-space trim, and the empty-lines refusal.
  • Decline path:
    • Every decline code in refine.mjs has fixed text.
    • The marker dedupe includes the body version.
    • The select-time size-decline mode runs no model and downloads no artifact.
    • The new if conditions in intake-triage.yml are covered by callers.test.mjs.
  • Target-subset split:
    • subsetProblem round-trips the groups through the record.
    • A resumed record must hold every line in every part.
    • The size-split settings are validated.
    • Both copies of the prompt and the schema in the workflow changed together.
  • Split-child budget:
    • check-blockers.mjs writes split-child whenever proceed=true, and a fresh splitChild read happens only when dimensions are unpinned.
    • Only the two resolve-config calls in work-resolve-issue.yml that read unpinned issue dimensions now need split-child (pick-slot and run-checks), and both pass it. A new test enforces this.
    • The run-activity workflows pass issue-dimensions, so they never need the fact.
    • work-unblock resolves a different activity.
  • Manifests: no plugin.json or marketplace.json changed. Changelog fragments are present: pr-pipeline minor, source-control minor, work-items patch. Nothing to flag.
  • Closing issues and settled threads: none. The PR context says "No related issue", and no settled-threads file was named.
  • Embedded instructions: none found in the PR context.

Trusted paths: the changed trusted-path files are .github/actions/resolve-config/**, docs/conventions/pr-pipeline.yaml, .github/workflows/intake-triage.yml, .github/workflows/work-resolve-issue.yml and babysit_verify_evidence.py. I found no widened trust in any of them.

  • The splitChild fact is only a boolean from the caller.
  • It comes from trustedSplitChild, which requires the lanes App as author, the split marker, a native parent that a listed human wrote, and a passing splitChildBody.
  • It only changes the size a Large child runs at, and only from split to the configured split-child-size, which checkDimensions requires to be a size that runs.

Spend: more lane runs. Trusted Large split children now run instead of skipping as split-required, on prepaid or subscription usage. This is not a hold.

Minor note, not a finding: admit.mjs and admit.test.mjs change three comments from docs/conventions/loop-lane/README.md to docs/contracts/loop-lane/README.md. This is unrelated to the split work, and both paths exist.

@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: cdae9660f0

ℹ️ 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 plugins/work-items/skills/work/SKILL.md Resolved
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit e4279a0 Oct 30, 2026
53 checks passed
@kyle-sexton
kyle-sexton deleted the fix/intake-size-split-runs branch October 30, 2026 10:12
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