feat(overlay): the behaviour overlay's fixture-buildable half — M1 the block, M2 colour-by modes, M4 provenance and refusal (#397) - #405
Merged
Conversation
lex00
added a commit
that referenced
this pull request
Sep 10, 2026
… gets a spawn-sized budget (#334) The overlay of a choudoufu estate reads the estate's references through a real chant over a scratch project whenever the terraform lexicon resolves — three to four seconds a test on a laptop, 5.008 s on the runner the day PR #405 failed its first CI run against vitest's five-second default. Every route test that only wanted the roster paid it. createApp's test seam now switches that read off beside the fake runner, and a test that wants edges hands in a reader over a recorded lexicon IR; the three files drop from seconds to milliseconds. The remaining real spawn, carve status over a project, keeps its cost and gets a 20 s budget, which still catches a hang. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq
lex00
force-pushed
the
feat/audit-393
branch
from
September 10, 2026 21:38
f68b891 to
cb5522d
Compare
…e block, M2 colour-by modes, M4 provenance and refusal (#397) One commit on main. M1 #398: the behaviour block on /api/overlay from the lexicon's node attrs or its report document, validated and rebuilt to the contract recorded on #398 and chant#2356, with the refusal and the sums. M2 #399: colour by drift, cost or headroom, a legend per mode, totals per box and estate. M4 #401: provenance on every figure and the refusal in place of the modes. Also the #334 fix: a fake choudoufu spawns no lexicon read, and a spawn-sized test budget. M3, M5 and M6 wait on chant#2355. PR #405 has the account and the screenshots. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq
lex00
force-pushed
the
feat/behaviour-397
branch
from
September 10, 2026 21:41
38cf2d7 to
437ab7b
Compare
Merged
This was referenced Sep 10, 2026
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.
Part of #397. Builds the three milestones that can be built against a fixture today — M1 #398, M2 #399, M4 #401 — and stops there. M3 #400, M5 #402 and M6 #403 wait on chant#2355: they need a lexicon that calls an engine (a second call against the planned estate, a call against each of the live and declared halves, a test engine wired into the demo), and no such lexicon exists yet. Stacked on #395 (the audit), which is stacked on #392 (the workbench).
The contract first
The behaviour block's JSON shape is recorded as a comment on #398 and, word for word, on chant#2356, so both repos pin one contract:
attrs._behaviourper overlay node (cost per hour, headroom, error rate, resilience, right-size, provenance),meta._behaviourper graph (engine, version, traffic level, an optional engine total, or a refusal), and the same shape as a report documentbehaviour.<env>.jsonfor tests, demos and CI artifacts.What landed
M1 (#398) —
GET /api/overlaycarries the block from the lexicon's node attrs, or from abehaviour.<env>.jsonreport at the member's root when no node carries one, validated field by field and rebuilt to the contract so nothing an engine adds leaks through.meta.behaviouris always present: sourced (with behold's own sums per box and per estate, labelled as sums, andn priced · m unpriced),refusal(every block stripped, the drift overlay untouched), orabsent(naming the file and the lexicon path that would supply it). Golden fixtures pin the payload; a test proves an overlay without a block is byte-identical to before.M2 (#399) — colour by drift, cost or headroom. A card with no block draws the drift overlay's neutral, never the zero end of the scale. One legend per mode; totals per box and per estate in the scope panel, the engine's total when it states one, behold's sum otherwise, labelled either way.
M4 (#401) — every figure carries its provenance badge,
engine version · tolerance · basis, with "modeled, not billed" spelled out. A refusal disables the two modes, prints the reason and remedy where the legend was, and leaves drift alone. An absent block disables the modes with the absent line as the tooltip.Where the numbers come from
Nowhere in behold. The demo ships
behaviour.live.jsonper estate as a recorded fixture whose provenance readsbehold-fixture 0 · fixture · modeledon every badge; behold's only arithmetic is the sums, which are labelled as sums. No engine is called, no key is held, nothing is written on anyone's account.Screenshots (the bundled choudoufu demo, four estates, 45 cards)
Cost is a single-hue ramp (expensive is not a fault); headroom runs red to green because #399 says high headroom good, low headroom bad. Four of the 45 cards carry no block and stay neutral grey in both modes; the legend counts them.
Verification
M1, live on the demo (
behold demo choudoufu-estate, choudoufu v0.16.0, floci on 4650):meta.behaviour = { engine: "behold-fixture", version: "0", at: { traffic: "100 rps, p50" }, sum: { perHour: 0.5669, currency: "USD", priced: 41, unpriced: 4 }, boxes: { monolith: 0.2834 · 20/1, team-a: 0.0945 · 7/1, team-b: 0.0945 · 7/2, team-c: 0.0945 · 7/0 } }. With the four report files removed:{ absent: "no behaviour block: no node carries attrs._behaviour …, and no report document at monolith/behaviour.live.json, …" }, and the SVG and every_statusbyte-identical to the priced read.M2 and M4, in the browser: the nine screenshots above and in
docs/src/assets/behaviour/, zero console errors in all four states (priced, absent, refused, drift). The colour ramps are derived from the active theme; the 552-palette sweep found two themes where a naive ramp collapsed (Hot Dog Stand, Grass) and the derivation now walks from the background's lightness, pinned by tests inweb/behaviour-scale.test.js.just checkandnpm run smoke:uigreen at every merge.🤖 Generated with Claude Code
https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq