fix(audit): seed the ledger in each narrow audit skill - #400
Merged
Merged
Conversation
Five audit leaves stated that the wizard seeds their ledger. It does not: the wizard pre-seeds only the comprehensive audit, so a leaf ran with no ledger at all. Every audit_resolve_checks call failed, the Audit plan tab stayed empty, and the report step rendered [label] placeholders. Each skill now seeds its own checklist in step 1, the way audit-attribution already does, with one row per id the skill resolves. audit-identify also declares the server-SDK area its step 5 uses. Generated-By: PostHog Desktop Task-Id: 6490a5fd-5ee9-4203-b9c4-0b4ff180c45b
gewenyu99
force-pushed
the
posthog/audit-leaf-seeds
branch
from
September 18, 2026 18:35
5478e2b to
8e2d4a0
Compare
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
Five audit leaves tell the agent that the runtime hands them a ledger:
It does not. The wizard pre-seeds only the comprehensive
auditskill (and the retiredevents-auditprogram). A skill promoted to an audit-family leaf runs through the wizard's generic agent-skill program, which seeds nothing, so todaywizard audit eventsand its four siblings run with no ledger on disk:audit_resolve_checkscall fails withunknown check id(s)[label]placeholdersThe same files contradict themselves: each one's check-entry section already says "This skill seeds N areas".
Change
Each skill seeds its own checklist in step 1, the pattern
audit-attributionalready uses — it states outright that the runtime does not pre-seed, and callsaudit_seed_checkswith an explicit payload.audit-eventsaudit-autocaptureaudit-feature-flagsaudit-session-replayaudit-identifyEvery id is one the skill's own steps resolve, in the order the steps reach them, with a label written from that check's rule text.
audit-identifyalso declares the server-SDK area its step 5 uses; its check-entry section previously named three areas and omitted it.The report steps said "Every check the wizard seeded for this skill ends up in the report" — now "Every check Step 1 seeded". That line is corrected in
audit-attributiontoo, which already seeded itself.Verification
node scripts/build.jssucceeds, and the builtaudit-events.zipandaudit-identify.zipcarry the seed call.vitest run scripts/plugins/tests scripts/lib/tests— 24 files, 207 tests pass.Labels and areas are what the wizard renders in its live check list, and after PostHog/wizard#1263 the areas are also what the task stream publishes as progress rows.
Created with PostHog Desktop