Skip to content

fix(crew-log): regenerate the fold catalogue for the subagents fold - #15744

Merged
bolichen97 merged 2 commits into
kirodotdev:mainfrom
chenmingwei23:fix/fold-catalogue-subagents-fold
Oct 1, 2026
Merged

bolichen97 merged 2 commits into
kirodotdev:mainfrom
chenmingwei23:fix/fold-catalogue-subagents-fold

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Make main green again in one merge by regenerating the committed fold catalogue so it matches the projection registry, and folding in the already-approved lessons.py fix that is otherwise mutually blocked with this PR.

Backend Tests shard 4 is red on main d5bdff64e0 (Linux and Windows): test/test_fold_catalogue.py fails 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 a subagents projection 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 committed folds.json / FOLDS.md no 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_scan not 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

What changed (motivation → approach → change)

Observed symptom: shard 4 red, with the generator refusing to build because the newly registered subagents fold has no _ANSWERS sentence. Root cause: #15078 registered the fold but did not run scripts/fold_catalogue.py --write, and the generator asserts every registered fold has a one-line answer sentence. The specific change:

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 subagents row 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 / flake8 on both changed files → clean.
  • mypy src/kiro_crew/vector_memory_runtime/lessons.py → no issues.
  • comment-history gate → passed.

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._FOLDS must also add its _ANSWERS sentence and run python3 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

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable) — regenerated FOLDS.md
  • No secrets, credentials, or internal references in the diff

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`.
@chenmingwei23
chenmingwei23 requested a review from a team as a code owner October 1, 2026 06:36
@github-actions github-actions Bot added readiness: checking Automated validation is still running fork Pull request from a fork (external contributor) labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed b6aabf0d64aaeac255f2561d5c422e2550ce9462 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b6aabf0

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of b6aabf0d64aaeac255f2561d5c422e2550ce9462 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 ships

Inventory (3 items) — 3 justified

Intent: FIX — make main green in one merge by regenerating the fold catalogue broken by #15078 and carrying the mutually-blocked lessons.py fix.

  1. The fold-catalogue generator builds again: subagents gets its answer sentence, un-redding shard 4 — justified
  2. The committed folds.json/FOLDS.md now document the subagents fold for dashboard-template authors — justified
  3. turn_lessons reads the row-token helper through _text_scoring, fixing the undefined name redding lint and shards 5/6 — justified

[FIRST-PRINCIPLES-REVIEWED] b6aabf0

Description read

[DESCRIPTION-READ] e761fefd24224686c40c71e36954e29b4be12000e198d158e99f3d8cc2f88103

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of b6aabf0d64aaeac255f2561d5c422e2550ce9462 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed b6aabf0d64aaeac255f2561d5c422e2550ce9462 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b6aabf0

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 bolichen97 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.

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.

@bolichen97
bolichen97 merged commit d8fa6a5 into kirodotdev:main Oct 1, 2026
99 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants