Repository navigation
chore(telemetry): clean up what release 1 left on next - #1053
Merged
Merged
Conversation
…on log The nine phase files and the per-commit mutation log narrate how release 1 was built. The work merged; git history keeps them. plan.md keeps the phase list without links, spec.md and context/target.md stay as the why. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
…lders The Python prototype readers and their fixtures, the memory bench and the draft usage record sat in task folders: run by nothing, and the draft duplicated the usage contract. The docs that cited them now say they were removed, and keep the figures the bench measured. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
Only builds of next between #993 and #1032 wrote <YYYY-MM>.jsonl; cli-v5.5.0, the first release with the ledger, already writes one file per day, and cli-v5.4.0 had no ledger. The adapter no longer reads, splits or removes a month's file, so a window is a test on each day file. The month cases leave the tests; the property tests keep their earlier-store dimension as days written by an earlier ingest. A store written by cli-v5.5.0 reports byte for byte as before, with no period, with --from/--to and by day, and is left with the same bytes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
- usage contract: run.unrecognised_shapes counts unreadable lines and assistant lines with a bad usage or no id, session or time; a line with no message.usage is no call and counts nowhere. - envelope reference: the empty-report diagnosis names coverage.records, and says a run field speaks only for the read that printed it. - 01-usage description lists the agent axis. - CLI telemetry memory: task and ticket come only from aidd telemetry task; restated rules become pointers to the contract. - CLI memory lists telemetry status. - ARCHITECTURE names the three telemetry hook scripts. Its guard allowed one script per plugin, which is how the table drifted: it now checks the Runs cell against every script the plugin's hooks.json runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
The usage contract restated every envelope field the 01-usage envelope reference already defines, and every new field had to change both. The contract now points at the reference and keeps only what it alone says: the version 1 note, the refusal object, the text report's anonymous label, the bounded read and that no path leaves. The reference gains the axis values and the filters' order, which only the contract listed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
ledger-by-day's contract still said in-progress and deterministic-tokens' spec said framed, a status the board maps to unknown; both pull requests merged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
- The scan count spies String.prototype.indexOf with t.mock.method, restored by the runner, instead of patching the prototype by hand. - A session array holding an upper-case id: dropping the i flag on ANY_UUID now fails a test. Both mutations were applied by hand and turned the named test red. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
A folder holds contract.md, plan.md with its phases folded in, and evidence.md. The review lives in the pull request, probes stay in the scratchpad, and the parent document goes to done when the pull request merges. Recorded where the backlog memory already describes task documents, replacing its plans, specs and reviews wording. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
…a report ignores Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
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.
🎯 What & why
Cleans up what the telemetry release 1 work left on
next: code for a ledger format no release wrote, probes and history in task folders, docs that drifted from the code, and two weak guard tests. Each audit item is one commit. Net: 44 files, +153 / -2043, 17 files deleted.🛠️ How it works
82a69d14phase-1..9.mdandcontext/mutation-proofs.md(-1,338 lines). plan.md keeps the phase list, without links.spec.mdandcontext/target.mdstay.d67ff80dcontext/prototype/(check.py, fixtures),memory-bench.mjsand the draftusage-record-contract.md(-255 lines). The docs that cited them say they were removed. The bench's measured RSS figures stay in the transcriptsevidence.md.d5666503<YYYY-MM>.jsonlhandling from usage-ledger-adapter.ts. A window is now a test on each day file, andholdsADayOf/inWindoware gone. The month cases are removed from the tests and the contract.e3294700unrecognised_shapesin the usage contract, the "When there is nothing" diagnosis and theagentaxis in 01-usage,telemetry.md(task only fromaidd telemetry task, restated rules turned into pointers),statusincli.md, and the three telemetry hooks indocs/ARCHITECTURE.md.bb0514d2c649282aledger-by-day/contract.mdgoes fromin-progresstodone, anddeterministic-tokens/spec.mdfromframedtodone.32814a0ft.mock.method(String.prototype, "indexOf")replaces the hand-patched prototype. An upper-case id in a multi-line session array covers theiflag onANY_UUID.4b3ab65dMonthly ledger: why it is dead.
nextbuilds between feat(telemetry): deterministic claude code token measurement, release 1 #993 and perf(telemetry): the ledger is kept by day, so an ingest costs what it adds #1031 wrote a month file.cli-v5.5.0is the first release with the ledger, and its adapter already writes one file per day.cli-v5.4.0had no ledger inledger/; its day files went to another sink.2026-10.jsonlinledger/now: it is not a partition, so it is neither read nor removed.forgetstill removes the whole directory.Tests changed, not only deleted (item 2).
ledger-upkeep.property,report-figures.propertyandreport-window.propertykept their starting-store dimension. It is now "days an earlier ingest wrote, unfolded" instead of "a month file", so the coverage of a pre-existing store stays.stored-usage-migration.propertylost its October-is-monthly flag. Its docstring already says "as cli-v5.5.0 left them".Guard change inside item 5.
scripts/__tests__/architecture-doc-matches-the-tree.test.jsallowed exactly one script per plugin row, which is how the table came to name onlyprompt-gate.cjs.hooks.jsonruns, and that each script exists.actual: [ 'hooks/prompt-gate.cjs' ], expected: [ 'hooks/catch-up.cjs', 'hooks/prompt-gate.cjs', 'hooks/session-start.cjs' ].🧪 How to verify
pnpm exec lefthook run pre-commit --all-filesexits 0.pnpm exec lefthook run pre-push --all-files:Test Files 522 passed | 1 skipped,Tests 6787 passed | 1 skipped.Bundle (
pnpm build): 700.6 KB onorigin/next, 699.8 KB on this branch.Test-first:
reads only day files, and leaves a month's name, ... alonefailed before the change withskippedLines: 1,damaged: {"2026-10"}, and passes after it.loadturns 4 adapter tests red.Same store, same report. Steps:
HOME,XDG_CONFIG_HOME,AIDD_USER_CONFIG_DIR,AIDD_TELEMETRY_DIR,CLAUDE_CONFIG_DIRin temp dirs,GIT_CONFIG_NOSYSTEM=1),npm i @ai-driven-dev/[email protected].aidd telemetry on, then backdate the consent, the same way the e2e tests do.cli/tests/fixtures/claude-usagetranscripts with 5.5.0.report --jsonwith theorigin/nextbuild on one copy and this branch's build on the other.Result, for no period,
--from 2026-10-07 --to 2026-10-07and--axis day: the reports are byte-identical, and so are the stores they leave behind.Limit: the fixture store is one day and 4 records.
Guard nits, by hand mutation:
ANY_UUIDwithoutiturnsreads every session array ..., whatever the case of its idsred.continueinstead ofreturnon an unclosed array turnsstops at the first unclosed session key ...red.doneandimplementedmake two columns" is wrong:kanban/src/domain/models/progress-status.tsmapsimplementedandreviewedto Done.framed,approvedandsupersededare unmapped and land in the unknown column.plan.mdalready in Done, so the board does not move.deterministic-tokens/context/still holds three docs with no status, so it remains a stray unknown card.transcripts-are-read-as-a-stream/review.mdstill citesmemory-bench.mjslines.deterministic-tokens/plan.mdcite "phase 6 task 5" and "phase 4 task 3.2".aidd-dev:01-planstill generatesphase-N.mdfiles, which the new task-folder policy folds intoplan.md. Changing that skill is a product decision left to the maintainer;plugins/aidd-devis untouched.🔗 Linked issue
None. Found by the R1 telemetry cleanup audit.
✅ I certify
🤖 Generated with Claude Code
https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp