Skip to content

characterization: the re-record accounting names routes by method, path and occurrence - #3343

Open
colinmegill wants to merge 1 commit into
edgefrom
rerecord-accounting-by-route
Open

colinmegill wants to merge 1 commit into
edgefrom
rerecord-accounting-by-route

Conversation

@colinmegill

Copy link
Copy Markdown
Member

Observable change: none in the product. Characterization tooling only (server/characterization/rerecord-accounting.cjs, its test, the README). No schema change.

Why: the manual re-record accounting still keyed routes by global registration ordinal after the recorders moved to method and path, so an app mounted before the routes shifted every id and misattributed changed callbacks (a mounted-app run gave 281 wrong entries under the old code).

What changes: routes are named by method and path plus their occurrence within that pair; an unrelated app mounted first leaves the accounting unchanged apart from the added route. When a pair's occurrence count differs between the archive and the run, the accounting stops and names every mismatched pair with both counts (for example GET /api/v3/* (archive 2, run 3)) instead of attributing. An equal-count reorder within a pair is paired by occurrence and left unattributed; the README and the source say so. The tests resolve their fixtures and Express through the repository path, so the workflow's isolated control checkout (which copies only the test files) still runs them: the dispatch test passes 1 of 1 and the dependency-free control layout 80 of 80.

Evidence: 80 of 80 re-record unit tests (71 existing plus 9) and 36 of 36 shared harness tests; the equal-count test fails on the old accounting and passes here; Prettier and ESLint clean on the changed files. Two independent review rounds.

🤖 Generated with Claude Code

…th and occurrence

The manual re-record accounting still keyed routes by their global
registration ordinal after the recorders moved to method and path, so an
app mounted before the routes shifted every id and misattributed changed
callbacks (281 wrong entries in a mounted-app run). Routes are now named by
method and path plus their occurrence within that pair, which an unrelated
mounted app leaves unchanged. When a pair's occurrence count differs between
the archive and the run, the accounting stops and names every mismatched
pair with both counts instead of attributing; an equal-count reorder within
a pair stays unattributed, which the finding and the source state. The new
tests resolve their fixtures through the repository, so the workflow's
isolated control checkout still runs them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant