Skip to content

feat: name the plugin release on every report - #24

Merged
omartelo merged 2 commits into
mainfrom
feat/plugin-version-header
Sep 13, 2026
Merged

omartelo merged 2 commits into
mainfrom
feat/plugin-version-header

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Task B, part B of three. It follows omartelo/lich#599, the lich side that reads the header. That PR tolerates a missing header, so the two can merge in either order. Release this one as 0.13.0, because the header is a contract change.

What changes

  • X-Lich-Plugin header on every report: plugin_version in each hooks/report-*.sh (these serve Claude Code, Codex, Antigravity, Crush and Kiro, and Cursor through Claude Code's install) and PLUGIN_VERSION in opencode/lich.js and omp/lich.js. assertContractHonoured checks the header against .claude-plugin/plugin.json on every case, so a copy that drifts goes red. A new test holds .codex-plugin to the same version.
  • opencode exit codes (lich#595). send_to_session and wait_for_answer treat exit 2 (timed out, ticket) and exit 3 (errand over, no answer) as results and return stdout. Other commands still treat anything non-zero as a failure. I grepped omp/, hooks/ and skills/: nothing else checks the exit code of lich send or lich wait.
  • Fixtures at a lich tag. tests/refresh-fixtures.sh now reads tests/lich-ref (v0.50.0) instead of main, and CI diffs against that tag. The refresh adds lich's kiro session-start case, so the provider enumeration test gains kiro: the contract changed.
  • Release rule in CLAUDE.md: a contract change bumps the minor, anything else bumps the patch. It also lists the version constants to bump (they are still 0.12.0 here), which the suite enforces. CHANGELOG.md [Unreleased] is updated.

Not fixed here: a pre-existing flake

<script> posts an accepted payload can fail with sent 0 requests, expected 1 when the CPU is saturated. It reproduced on main (1 of 4 runs with 60 busy loops on 20 cores) and in 0 of 76 runs without load. Root cause: the scripts' curl --max-time 1 gives up before the stub answers, and the test assumes a report always lands. This deserves its own change.

Test plan

  • node --test tests/*.test.mjs: 198 pass
  • Old runner against the new exit-code tests: those 2 fail
  • CI fixtures-drift green at v0.50.0

Every hook script and both modules send X-Lich-Plugin with the release they
ship in; the contract suite asserts it on every report against the Claude Code
manifest, and a new test holds the Codex manifest to the same version.

opencode: send_to_session and wait_for_answer treat lich's exit 2 (timed out,
ticket handed back) and 3 (errand over, no answer) as results and return
stdout, since lich#595 made those codes outcomes rather than errors.

Fixtures are refreshed at the lich release in tests/lich-ref instead of main.
At v0.50.0 that adds the kiro provider, so the provider enumeration test moves
with the contract.

The release rule now says a contract change bumps the minor, anything else the
patch, and lists the version constants to bump.
@omartelo
omartelo merged commit ce425d4 into main Sep 13, 2026
3 checks passed
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