Repository navigation
fix: prune generated crewmates bound to skill-view aliases - #15103
Conversation
An older agent sync walked the agents directory before discovery learned to leave skill-view aliases out, so it enrolled one crewmate per alias file. The startup prune only judges rows whose spec discovery lists, and discovery never lists an alias, so every such row was kept as if its agent were uninstalled and the roster stayed full of them. A row bound to an alias is now judged on its own sync stamp and fresh-sync shape. The member_id, overlay, team and chatted rules still apply, the delete re-checks the row under the same locks, and the marker moves to v3 so installs the earlier passes left untouched run once more.
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. The alias-name pin (prefix + 24 hex) is duplicated from [DESIGN-REVIEWED] f32819a Description read[DESCRIPTION-READ] 8e5d41ef738741ea867f64a7b542b3c5ce8139523bc5fe477991d2f2a58669dd 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 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Confirm on an affected install the alias rows carry a sync-source stamp and fresh-sync shape; a mismatch makes this pass a third silent no-op. What this change shipsInventory (5 items) — 5 justifiedIntent: FIX — the startup prune also removes the never-chatted crewmates an older sync generated for skill-view alias files, so the Crewmates page stops showing dozens of
Evidence checked: the new tests fail on base (base skips alias rows because [FIRST-PRINCIPLES-REVIEWED] f32819a Description read[DESCRIPTION-READ] 33dd6192efc2fbad44c0f54cae67b65f4a5b8443a6da7ea2a738b36e8fb3223e That sha256 names the PR description this verdict read. Recompute it with |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
A row is judged as a skill-view alias row only when its name is exactly what the projection writes: the prefix plus 24 lowercase hex digits. A crewmate named with the prefix and any other tail is an ordinary row and needs an installed spec, so with none it is kept. The pre-delete docstrings now say the spec re-read applies to rows bound to an installed spec; an alias row has no spec to re-read.
|
GPT F1 ( Opus advisory (docstrings say the spec is always re-read before a delete): both docstrings now scope the re-read to rows bound to an installed spec. |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] f32819a Description read[DESCRIPTION-READ] 363c5a128e9565076420a01f8ceaeb605bd1327be6628c6175765dcc3dd54f03 That sha256 names everything this verdict read: the PR description, plus the 9 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 |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed. A row is deleted only if its name fullmatches kirocrew-skill-view-<24 hex>, its source is builtin/package/aim, it has the fresh sync shape (any member_id, model, memory_store or extra key keeps it), it is not in the overlay or a team, and it has no Crewmates DM turn (unreadable history keeps it). Delete time re-checks under the config lock; no agent files or transcripts are touched; v3 marker makes it run once. No path to losing a user-authored or chatted crewmate.
Non-blocking: _SKILL_VIEW_ALIAS_NAME_RE duplicates skill_projection._LEGACY_ALIAS_NAME_RE, importing it would stop drift.
…15576) * fix(crew): prune generated crewmates never chatted with on their page (#14897) The startup prune only accepted rows stamped source "builtin", but the old agent sync stamped each row with its spec's own source, so installs whose agents came from packages had every row skipped and kept a roster full of templates. Its "chatted" rule also counted any session that ran the agent (subagent, cron, app slot) and a DM thread merely opened. A row bound to an installed user or package spec, whose source stamp matches that spec's, is now a candidate, and it counts as chatted only when its own Crewmates page DM transcript holds a turn past the metadata line, archived compaction segments included. The marker moves to crewmate_prune_v2_migrated.json so installs the first pass left untouched get one more run. The crewmates launch RFC's section 03 records the rule: package-installed specs are covered, the runtime's own, private and uninstalled specs are left alone, and "chatted with" means a turn in the crewmate's own Crewmates-page thread. (cherry picked from commit c5c307c) * fix: prune generated crewmates bound to skill-view aliases (#15103) * fix: prune generated crewmates bound to skill-view aliases An older agent sync walked the agents directory before discovery learned to leave skill-view aliases out, so it enrolled one crewmate per alias file. The startup prune only judges rows whose spec discovery lists, and discovery never lists an alias, so every such row was kept as if its agent were uninstalled and the roster stayed full of them. A row bound to an alias is now judged on its own sync stamp and fresh-sync shape. The member_id, overlay, team and chatted rules still apply, the delete re-checks the row under the same locks, and the marker moves to v3 so installs the earlier passes left untouched run once more. * fix: judge only exact alias names on the row alone A row is judged as a skill-view alias row only when its name is exactly what the projection writes: the prefix plus 24 lowercase hex digits. A crewmate named with the prefix and any other tail is an ordinary row and needs an installed spec, so with none it is kept. The pre-delete docstrings now say the spec re-read applies to rows bound to an installed spec; an alias row has no spec to re-read. (cherry picked from commit 6fb9523) --------- Co-authored-by: Ray Xu <38930179+buluoray@users.noreply.github.com>
Problem / Motivation
Goal: The startup crewmate prune also removes the never-chatted crewmates an older sync generated for skill-view alias files.
Users still see dozens of crewmates named
kirocrew-skill-view-<hex>on the Crewmates page after the prune has run, and clearing the marker and re-running removes none of them. Each row is exactly what the old sync wrote: nomember_id, the shareddefaultstore, abuiltinstamp and the spec's description.Why it matters
The prune exists so the Crewmates page shows only crewmates the person made or talked to. On installs with many skill-bearing agents, the alias rows are most of the roster, so the page stays cluttered and the prune looks broken.
Not a goal
member_id, aconfig.local.jsonleaf, a team, a non-default field or a Crewmates-page DM turn still keep a row.What changed (motivation → approach → change)
kirocrew-skill-view-*alias, fresh sync shape, never chattedmember_id, overlay leaf, team, tuned field or a DM turnkirocrewcrewmate_prune_v2_migrated.jsoncrewmate_prune_v3_migrated.jsonThe prune only judges a row whose spec discovery lists. Discovery never lists a skill-view alias (
agent_spec_format.is_native_skill_alias_name), because the runtime writes those files to project another spec's skills. So every alias row looked like a crewmate whose agent was uninstalled, and the prune skipped it.crewmate_prune_migration.pynow judges an alias row on the row alone: its string stamp must bebuiltin,packageoraimand its shape a fresh sync row. The delete re-checks the row's identity and shape under the same locks and skips the spec re-read, since there is no spec. The marker moves to v3, so installs that already wrote the v1 or v2 marker run the pass once more. Thecrew-mode.mdspec, the feature map and RFC crewmates-launch §03 say that an alias row is a generated row, not an uninstalled spec.Backwards compatibility
Compatible: only
config.jsonrows the old sync wrote for alias files are removed, under the same keep rules as every other generated row; no agent file or transcript is touched.Tests
test_rows_bound_to_skill_view_aliases_are_removed: both row shapes seen in the field (with and withoutmodel/display_name) are removed when discovery lists no spec.test_a_skill_view_row_the_owner_chatted_with_or_claimed_is_kept: a DM turn, amember_id, a tuned field or akirocrewstamp keeps an alias row, and nothing is refused.test_the_first_passes_marker_does_not_stop_this_onenow also leaves a v2 marker in place and expects the pass to run.Manual verification
N/A -- unit coverage sufficient: the change is a config-row filter, and the tests use the exact rows a user reported.
Related Issues
no linked issue: reported directly by a user on the internal edition.
Pattern harvest
Not generalizable: the miss came from one filter (discovery's alias exclusion) that this pass relied on as its spec inventory.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)