Repository navigation
fix(crew-log): regenerate the fold catalogue for the subagents fold - #15744
Conversation
kirodotdev#15078 added a `subagents` projection fold but did not add its answer sentence to the catalogue generator or regenerate the committed catalogue, so test_fold_catalogue.py reddened on main d5bdff6 (shard 4, Linux + Windows): the generator refused to build (no `_ANSWERS` sentence for `subagents`) and the committed folds.json / FOLDS.md no longer matched the registry. Add the `subagents` sentence to `_ANSWERS` and regenerate both artifacts with `python3 scripts/fold_catalogue.py --write`.
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify commit 2 is #15737's commit carried byte-identical with authorship preserved — the one claim unreadable from this checkout. What this change shipsInventory (3 items) — 3 justifiedIntent: FIX — make main green in one merge by regenerating the fold catalogue broken by #15078 and carrying the mutually-blocked lessons.py fix.
[FIRST-PRINCIPLES-REVIEWED] b6aabf0 Description read[DESCRIPTION-READ] e761fefd24224686c40c71e36954e29b4be12000e198d158e99f3d8cc2f88103 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm the folded commit is byte-identical to #15737 with authorship preserved, and close #15737 after merge as stated. [DESIGN-REVIEWED] b6aabf0 Description read[DESCRIPTION-READ] 52e300804e2723d69d0880481406c8c762d01db19623133d3ace6448c4b1b4e3 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
kirodotdev#15688 replaced lessons.py's by-name imports from text_scoring with reads through the owner module. kirodotdev#15517, which merged after it, added turn_lessons with one bare _row_stem_tokens_for_scan call, so main raises NameError: name '_row_stem_tokens_for_scan' is not defined on every turn_lessons call (flake8 F821). Read it through _text_scoring like the other callers in the file.
bolichen97
left a comment
There was a problem hiding this comment.
Verified locally on main 6b033ab: this PR alone clears the lessons.py F821, the lesson-injection and composition-contract tests, and the fold catalogue (167 passed). CI and every AI-review lane are green. Approving to un-red main.
Problem / Motivation
Goal: Make
maingreen again in one merge by regenerating the committed fold catalogue so it matches the projection registry, and folding in the already-approvedlessons.pyfix that is otherwise mutually blocked with this PR.Backend Tests shard 4 is red on main
d5bdff64e0(Linux and Windows):test/test_fold_catalogue.pyfails three ways —TestTheCatalogueCoversTheKernel::test_it_names_exactly_the_folds_the_product_keeps,TestTheCommittedCatalogueIsCurrent::test_it_matches_what_the_code_generates, and::test_the_generators_own_selftest_passes. #15078 (feat(crew-log): a subagents fold, and a panel section that draws it,21477628d4) added asubagentsprojection fold to the kernel registry but did not add its answer sentence to the catalogue generator or regenerate the committed catalogue, so the generator refuses to build (folds with no sentence saying what they answer: ['subagents']) and the committedfolds.json/FOLDS.mdno longer match the registry.Separately, main is also red on lint + shards 5/6 from
src/kiro_crew/vector_memory_runtime/lessons.py(_row_stem_tokens_for_scannot defined). The two fixes block each other: a PR fixing only one still shows the other's reds. This PR carries both so main can go green in a single merge.Why it matters
While this is red, every PR that touches the backend fails on both platforms, blocking the whole queue. The catalogue is also the single source of truth an agent authoring a dashboard template reads to learn which folds exist and what each one's fields are called and typed — a stale or unbuildable catalogue sends that author to write a provider reading a field no fold produces.
Not a goal
subagentsfold's behaviour, its projection logic, or the panel section that draws it (that is feat(crew-log): a subagents fold, and a panel section that draws it #15078's scope).lessons.pyfix beyond carrying it verbatim — the second commit is fix(memory): read turn_lessons' row-token helper through text_scoring #15737's single commit, folded unchanged.What changed (motivation → approach → change)
Observed symptom: shard 4 red, with the generator refusing to build because the newly registered
subagentsfold has no_ANSWERSsentence. Root cause: #15078 registered the fold but did not runscripts/fold_catalogue.py --write, and the generator asserts every registered fold has a one-line answer sentence. The specific change:subagentsanswer sentence to_ANSWERSinscripts/fold_catalogue.py(wording taken from the fold's own purpose comment inprojection.py: "Which children did this session dispatch, and for each one what happened, how long it ran and what it cost."), then regenerate both committed artifacts withpython3 scripts/fold_catalogue.py --write:src/kiro_crew/builtin_skills/kirocrew-dev/dashboard-template/folds.jsonsrc/kiro_crew/builtin_skills/kirocrew-dev/dashboard-template/FOLDS.mdfix(memory): read turn_lessons' row-token helper through text_scoring— cherry-picked unchanged (author and message preserved) so this PR carries both fixes. fix(memory): read turn_lessons' row-token helper through text_scoring #15737 and this PR block each other on main (fix(memory): read turn_lessons' row-token helper through text_scoring #15737 is red only on shard 4 = fold catalogue; this PR is red only on lint + shards 5/6 = lessons.py), so folding fix(memory): read turn_lessons' row-token helper through text_scoring #15737's commit here lets main go green in one merge; fix(memory): read turn_lessons' row-token helper through text_scoring #15737 closes after.This is a catalogue regeneration plus the folded upstream fix — no projection-kernel behaviour changes of our own.
Backwards compatibility
Compatible: commit 1 only adds a
subagentsrow to two generated documentation/data artifacts and one answer sentence to the generator; commit 2 points one call at an existing module-qualified helper. Nothing that works today stops working; no field, kind, or key is rejected, renamed, or removed.Tests
test/test_fold_catalogue.py test/test_lesson_turn_injection.py -n0→ 74 passed (the three previously-failing catalogue tests and the lessons.py path both green).python3 scripts/fold_catalogue.py --check→ gate passed (committed == generated).python3 scripts/fold_catalogue.py --test→ selftest passed (11 folds, drift observable).black --target-version py312/isort/flake8on both changed files → clean.mypy src/kiro_crew/vector_memory_runtime/lessons.py→ no issues.Manual verification
N/A — the fold-catalogue gate/selftest and the lesson-injection suite are the automated verification; there is no runtime surface to exercise by hand.
Related Issues
Fixes the main-side red introduced by #15078. Folds in #15737 (closes after merge).
Pattern harvest
Rule candidate: review-prompt — a PR that adds a projection fold to
proj._FOLDSmust also add its_ANSWERSsentence and runpython3 scripts/fold_catalogue.py --write; the catalogue gate catches it in CI but the fix belongs in the fold-adding PR. Pattern: new registry entry not propagated to its committed generated artifact.Checklist
FOLDS.md