Hooks say when Scribe didn't answer; the CSS consumer map (milestone 302 steps 1–3) #127

Merged
bvandeusen merged 7 commits from dev into main 2026-08-23 14:18:32 -04:00
Owner

Lands on main:

  • Write-path hooks: fail-open, not fail-silent (#2932; 9c00a4b, 0ab94b2, 31383bc): after-write curl budget 4 → 8 s; a configured instance that does not answer is said once per outage (> Scribe did not answer the prior-art check … this write went UNCHECKED), shared marker between the two hooks, cleared by any successful call; the record nudge is withheld on an unanswered call; check_plugin.py allows exactly that line when unreachable. Plugin 0.1.42–0.1.43.
  • The CSS consumer map (milestone 302 steps 1–3; dffbf43, ffbdf19, 8664d8a, c28c87c): class_references + scan_archive read template class tokens in the same archive walk as definitions; code_shape_consumers (migration 0086) holds css row → referencing file + count, rebuilt on every refresh (own-file resolution for a scoped rule, fan-out otherwise; derived, not backed up); surfaces — used_by on every css row of list_shapes, flag="unused-css", consumers on css derive groups and the write-path family, the derive line's "used by N template(s)", coverage unused_css + standing block. Plugin 0.1.44.

CI green on head c28c87c (run 4287). Migration 0086 runs on deploy.

🤖 Generated with Claude Code

Lands on main: - **Write-path hooks: fail-open, not fail-silent** (#2932; `9c00a4b`, `0ab94b2`, `31383bc`): after-write curl budget 4 → 8 s; a configured instance that does not answer is said once per outage (`> Scribe did not answer the prior-art check … this write went UNCHECKED`), shared marker between the two hooks, cleared by any successful call; the record nudge is withheld on an unanswered call; `check_plugin.py` allows exactly that line when unreachable. Plugin 0.1.42–0.1.43. - **The CSS consumer map** (milestone 302 steps 1–3; `dffbf43`, `ffbdf19`, `8664d8a`, `c28c87c`): `class_references` + `scan_archive` read template class tokens in the same archive walk as definitions; `code_shape_consumers` (migration 0086) holds css row → referencing file + count, rebuilt on every refresh (own-file resolution for a scoped rule, fan-out otherwise; derived, not backed up); surfaces — `used_by` on every css row of `list_shapes`, `flag="unused-css"`, `consumers` on css derive groups and the write-path family, the derive line's "used by N template(s)", coverage `unused_css` + standing block. Plugin 0.1.44. CI green on head `c28c87c` (run 4287). Migration 0086 runs on deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 7 commits 2026-08-23 14:18:27 -04:00
fix(plugin): after-write hook waits 8s on the prior-art call — a cold-start round-trip (~4.6s after a redeploy) failed open at 4s and dropped the ledger line on the first write; plugin 0.1.42
CI & Build / Python lint (push) Successful in 6s
CI & Build / Plugin hooks (push) Successful in 11s
CI & Build / TypeScript typecheck (push) Successful in 36s
CI & Build / integration (push) Successful in 27s
CI & Build / Python tests (push) Successful in 1m9s
CI & Build / Build & push image (push) Successful in 14s
9c00a4b6e1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(plugin): write-path hooks say when Scribe did not answer — once per outage, shared marker, record nudge withheld on an unanswered call; check_plugin allows exactly that line when unreachable; plugin 0.1.43 (#2932)
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 13s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / integration (push) Successful in 40s
CI & Build / Python tests (push) Failing after 49s
CI & Build / Build & push image (push) Skipped
0ab94b2a00
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
test(hooks): the two tests that read a refused connection as "nothing recorded" now answer through a sink, and the silence case removes the shape it had left behind (#2932)
CI & Build / integration (push) Successful in 27s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / Python tests (push) Successful in 1m7s
CI & Build / Build & push image (push) Successful in 16s
31383bcebe
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(coverage): class_references + scan_archive — each template-bearing file's class tokens (static class=/className=, Vue :class object/array/ternary, React className={…}, Svelte class:x) read in the same tar walk as definitions; the CSS consumer map's extractor (milestone 302 step 1, #2934)
CI & Build / Plugin hooks (push) Failing after 1s
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 12s
CI & Build / integration (push) Successful in 29s
CI & Build / Python tests (push) Successful in 1m2s
CI & Build / Build & push image (push) Successful in 29s
dffbf43d84
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(ledger): the CSS consumer map — code_shape_consumers edges (shape → file whose markup names the class, count), migration 0086, resolve_consumers (own-file row when the template defines the class, else every other definition), sync_repo_consumers rebuilt from the archive on every refresh, consumers_of; derived, so not backed up (milestone 302 step 2, #2935)
CI & Build / Plugin hooks (push) Successful in 11s
CI & Build / Python lint (push) Successful in 4s
CI & Build / integration (push) Failing after 29s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Failing after 52s
CI & Build / Build & push image (push) Skipped
ffbdf19116
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(ledger): the consumer map surfaces — every css row carries used_by on list_shapes, flag="unused-css" (the map's negative space, surfaced never deleted), derive groups and the write-path family carry consumers, the derive line says "used by N template(s)", coverage payload unused_css + the standing block; docs, SKILL, plugin 0.1.44; the two step-2 tests expected 5 edges where fan-out makes 6 (milestone 302 step 3, #2936)
CI & Build / Plugin hooks (push) Successful in 9s
CI & Build / Python lint (push) Successful in 4s
CI & Build / TypeScript typecheck (push) Successful in 38s
CI & Build / integration (push) Failing after 44s
CI & Build / Python tests (push) Successful in 1m26s
CI & Build / Build & push image (push) Successful in 31s
8664d8ad14
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
test(ledger): the consumer-map integration test owns its unreferenced rule — the seeded button.css row vanishes under the test's own tree (#2936)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 27s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 1m6s
CI & Build / Build & push image (push) Successful in 15s
c28c87c39e
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bvandeusen merged commit cba542a3ec into main 2026-08-23 14:18:32 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#127