Skip to content

feat(overlay): the behaviour overlay's fixture-buildable half — M1 the block, M2 colour-by modes, M4 provenance and refusal (#397) - #405

Merged
lex00 merged 1 commit into
mainfrom
feat/behaviour-397
Sep 10, 2026
Merged

feat(overlay): the behaviour overlay's fixture-buildable half — M1 the block, M2 colour-by modes, M4 provenance and refusal (#397)#405
lex00 merged 1 commit into
mainfrom
feat/behaviour-397

Conversation

@lex00

@lex00 lex00 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

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._behaviour per overlay node (cost per hour, headroom, error rate, resilience, right-size, provenance), meta._behaviour per graph (engine, version, traffic level, an optional engine total, or a refusal), and the same shape as a report document behaviour.<env>.json for tests, demos and CI artifacts.

What landed

M1 (#398)GET /api/overlay carries the block from the lexicon's node attrs, or from a behaviour.<env>.json report 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.behaviour is always present: sourced (with behold's own sums per box and per estate, labelled as sums, and n priced · m unpriced), refusal (every block stripped, the drift overlay untouched), or absent (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.json per estate as a recorded fixture whose provenance reads behold-fixture 0 · fixture · modeled on 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)

colour by drift (the legend from #393, unchanged) colour by cost
drift cost
colour by headroom the scope panel's totals in cost mode
headroom totals
the badge on every figure in the inspect pane the refusal in place of the modes
badge refusal

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 _status byte-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 in web/behaviour-scale.test.js.

just check and npm run smoke:ui green at every merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq

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
lex00 changed the base branch from feat/audit-393 to main September 10, 2026 21:41
…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
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