Skip to content

feat!: structured diagnostics, tighter types, CI hardening - #427

Merged
codecaaron merged 3 commits into
mainfrom
feat/leverage-batch-2
Nov 28, 2026
Merged

codecaaron merged 3 commits into
mainfrom
feat/leverage-batch-2

Conversation

@codecaaron

Copy link
Copy Markdown
Owner

Three changes, one commit each, on top of #426.

CI and release hardening

  • Every action is referenced by a full commit SHA, each resolved through the GitHub API, with its version beside it.
  • Every bun install uses --frozen-lockfile.
  • ci.yaml gets a top-level contents: read; the release and deploy jobs keep the per-job permissions they had.
  • The release job passed the tag-derived version straight into four shell scripts. A tag name may contain $, backticks and ;, so a crafted v* tag could run shell inside the job that publishes. The version now reaches those scripts through the environment.

Not done here: a protected environment in front of the publish, which needs matching settings on GitHub and on each package's npm trusted publisher.

Four type holes closed

Each of these compiled and then failed or misbehaved at run time; each is now a compile error on TypeScript 7.0.2 and 5.9.3 and is pinned by a negative assertion in the published fixtures.

Input Error now
addColorModes with an unknown colour token, a non-string alias, an unknown initial mode, or a basedOn naming no mode TS2322 listing the valid token paths, or TS2345 listing the valid modes
An unplugin adapter called with no options TS2554: Expected 1 arguments, but got 0
effect-ui .contract() with an unknown key TS2322 … not assignable to type 'never'
addSelectors alias without the _ prefix (core, react, effect-ui) TS2322 naming UnprefixedSelectorAlias<"name">

light-dark(), contrast-color() and hwb() are accepted as theme colour values, and the extractor recognises color-mix(), light-dark() and contrast-color() token values as colours.

Structured diagnostics; view-transition refs

  • Value diagnostics, such as a strict token miss, report the line and column of the offending value instead of the start of the chain, and carry property, value and a reason code.
  • ExtractChainFact is exported complete. ExtractionSession gains analysisInputs and analyzeWith(). The system loader returns token values and colour modes as data; registered keyframes are exposed.
  • The agent CLI uses these and no longer parses message text or generated CSS. animus describe lists keyframes.
  • @animus-ui/react/view-transition exports a ViewTransition whose enter, exit, update, share and default props accept Animus view-transition refs.

Release notes

  • Breaking (types): the four rejections in the table above. ThemeBuilder gains a fourth type parameter and ColorModeOptions a second.
  • Breaking: value diagnostics report their position at the value; diagnostics gain property, value and reason.
  • Breaking: the chain-fact stages[].skipped entries change from [property, reason] tuples to { property, reason, code } objects.
  • Breaking: in production, a registered view transition that no analysed source references is no longer emitted.
  • Breaking: animus describe and animus check move to schema 2.
  • New: @animus-ui/react/view-transition; ExtractionSession.analysisInputs and analyzeWith(); systemThemeValues; registeredKeyframes.

Verification

  • vp run verify:full passes at bfd772a2: 54 of 54 tasks.
  • The parity oracles are unchanged. The seam baseline is re-recorded under intent structured-diagnostics-20261128; the reviewed difference is added property and value fields and moved columns, nothing else.
  • verify:bench: build:vite-app passes (ratio 0.998). The other three rows report INVALID, because the loaded system and the diagnostics now differ from release 0.2.0 by design. Timed outside the gate with its own runners, they are within budget (ratios 1.002, 1.011, 1.016). scripts/bench/accepted-differences.json is not updated in this PR; the pairs to record are:
Row Fixture Baseline Candidate
loader:large-closure large-closure 95be9e47926a23eb6b29d7b1c8e39c3c66fd63ea556eb428f6d288ac1d1f427d 58f777b86e4f9a519911024f22cd9089d58c121441c0123678902c0d5d318ac9
loader:showcase showcase fb211aefb668300290d73f956e9d410b2727ecf045cde103f97d13d79a6ccb1b 69dfcb2884578167e48fcd8f3bab6f8cb70fa9e80b0e507df55c67dae0b09284
analysis:showcase showcase-analysis c1edb027a5935ba98105d226039783a408ad400b82de1dd8a13f333a4db1c554 5cc7f0e8c5ab12dab02e7bcca7a06d7dde28f90dad3b8726f2298c74f794a0bc

🤖 Generated with Claude Code

codecaaron and others added 3 commits November 28, 2026 02:47
Every action is referenced by a full commit SHA with its version beside it. Each bun install uses --frozen-lockfile. ci.yaml gets a top-level contents: read. The release job passes the tag-derived version to its scripts through the environment instead of interpolating it into shell, which closed a shell injection through a crafted tag name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… time

addColorModes rejects unknown colour tokens, non-string aliases, an unknown initial mode and a basedOn naming no mode. The unplugin adapters require their options argument. effect-ui .contract() rejects unknown keys at every level. addSelectors rejects an alias without the _ prefix, in core and effect-ui. Each is pinned by a negative assertion in the published type fixtures.

light-dark(), contrast-color() and hwb() are accepted as theme colour values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ransition

Value diagnostics report the position of the offending value and carry property, value and a reason code. ExtractChainFact is exported complete. ExtractionSession gains analysisInputs and analyzeWith; the system loader returns token values and colour modes as data, and registered keyframes are exposed. The agent CLI uses these and no longer parses message text or generated CSS; describe and check move to schema 2.

@animus-ui/react/view-transition exports a ViewTransition that accepts Animus view-transition refs. In production, a registered view transition no analysed source references is no longer emitted. The React builder's addSelectors rejects an alias without the _ prefix. The seam baseline is re-recorded under intent structured-diagnostics-20261128: added property and value fields and moved columns only.

Verified at this commit: vp run verify:full (54 of 54 tasks). verify:bench passes build:vite-app and reports the other three rows invalid, because output now differs from release 0.2.0 by design; scripts/bench/accepted-differences.json is not updated here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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