fix(autoplan): bind commit before split-array index in tasks aggregator (#2018) - #2021
Open
0xDevNinja wants to merge 2 commits into
Open
fix(autoplan): bind commit before split-array index in tasks aggregator (#2018)#20210xDevNinja wants to merge 2 commits into
0xDevNinja wants to merge 2 commits into
Conversation
The Phase 4 implementation-tasks aggregator filtered per-phase JSONL by
branch and recent commit with:
select(.branch == $branch and ($commits | split("|") | index(.commit) != null))
Inside the ($commits | split("|") | ...) pipe the input is the split
array, so index(.commit) tried to index an array with the string
"commit" and jq errored with "Cannot index array with string". The
surrounding invocation swallowed it via 2>/dev/null, so every run
silently dropped all records and reported no actionable tasks even when
valid task records existed for the current branch and commits.
Bind the record's commit to $c before entering the split-array pipe so
index() receives the commit string and the membership test works.
Fixes garrytan#2018.
…lter Extracts the shipped select filter from autoplan/SKILL.md and runs it through jq over sample records: matching branch+commit is kept, a non-matching commit / wrong branch / missing commit field are excluded without a jq error. Pins the garrytan#2018 fix and fails on the bare index(.commit) form (which errors). Refs garrytan#2018.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
time-attack
pushed a commit
to time-attack/gstack
that referenced
this pull request
Jul 14, 2026
Contributor
|
@16francej ensures commits are real and dont get split can merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/autoplan's Phase 4 implementation-tasks aggregator returned zero tasks on every run, even when valid per-phasetasks-<phase>-*.jsonlrecords existed for the current branch and recent commits. Users sawNo actionable tasks emitted from any phasewith no diagnostic.Root cause
The branch+commit filter was:
Inside
($commits | split("|") | ...)the pipe's input is the split array, soindex(.commit)tried to index that array with the string"commit":The surrounding
jq ... >> "$ALL_JSONL"swallowed the error via2>/dev/null, so the aggregator silently dropped every record. Repro'd onv1.58.1.0(also affectsv1.52.2.0).Fix
Bind the record's
.committo a variable before entering the split-array pipe, soindex()receives the commit string:One-line change in the source resolver (
scripts/resolvers/tasks-section.ts),autoplan/SKILL.mdregenerated viabun run gen:skill-docs. Added a short comment so the binding isn't "simplified" back into the bug later.Tests
New free regression test
test/autoplan-tasks-aggregator.test.tsextracts the shippedselect(...)filter fromautoplan/SKILL.mdand runs it throughjq:commitfield → excluded, no errorindex(.commit)form5/5 pass. Full free suite green (
bun testgen-skill-docs + skill-validation: 734 pass), gen-skill-docs freshness check clean.Fixes #2018.