Skip to content

hotfix(lint): bump modular-skill token caps + SKILL.md bootstrap cap#586

Closed
danieljohnmorris wants to merge 4 commits into
mainfrom
fix/main-ci-566-regressions
Closed

hotfix(lint): bump modular-skill token caps + SKILL.md bootstrap cap#586
danieljohnmorris wants to merge 4 commits into
mainfrom
fix/main-ci-566-regressions

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

@danieljohnmorris danieljohnmorris commented May 21, 2026

Summary

Surgical fix for the lint portion of the post-PR-#566 main-CI breakage. The other half (examples/crypto-primitives.ilo VM panic on b64-dec!) was already shipped via PR #579 before this PR landed, so its redundant B64Dec commit has been dropped via rebase.

What's in the diff

Two commits:

  1. skills: bump per-module token caps to match 0.12.x growth — raises the per-file caps in scripts/check-skill-tokens.py so the five modular skill files (ilo-language, ilo-builtins-core, ilo-builtins-math, ilo-builtins-io, ilo-builtins-text) clear the lint check at their current size. The docs earn their tokens; trimming was already attempted in prior PRs without success.
  2. tests: bump SKILL.md bootstrap cap from 8 KB to 12 KB — raises the body_is_thin_bootstrap threshold to accommodate current SKILL.md density (10925 bytes today). Same reasoning: trim was attempted and rejected as net-information-loss.

What was dropped on rebase

Test plan

  • cargo fmt --check clean
  • Local lint: skill-token-budget validator passes
  • Local: body_is_thin_bootstrap passes
  • No source-code or builtin-surface change

Follow-ups

  • If skill docs grow further, consider a structural trim or a per-file cap revisit.

b64-dec is tree-bridge eligible and returns R t t, but the matching
entry in tree_bridge_returns_result was missing. The verifier
accepts b64-dec! as Result-returning, but the VM compiler's tree-
bridge dispatch then hits the assert at src/vm/mod.rs:1887 and
panics with 'auto-unwrap on a non-Result tree-bridge builtin slipped
past verify' before the program even starts running.

The matching B64uDec entry has been there since the url-safe cluster
landed; B64Dec was added to is_tree_bridge_eligible in the crypto
cluster (PR #560) but never wired into the Result whitelist below
it. Same fix as the b64u case: one extra match arm.

Adds two regression tests in tests/regression_crypto_primitives.rs:
b64_dec_bang_auto_unwrap_does_not_panic_vm pins the Ok-path round-
trip cross-engine, and b64_dec_bang_propagates_err pins the Err-path
(invalid input) so a future drop of B64Dec from the whitelist is
caught at unit-test scope rather than waiting for the examples
harness to repeat-fire across every -- run: entry.
The four ilo-builtins-* modules and ilo-agent have drifted over their
1000-token cap with the HTTP verb cluster (#5z), getx/pstx (#5bn),
crypto primitives, calendar arithmetic, and the numeric/text prelude
additions of 0.12.x. ilo-language has crept just over its 1500-cap
on the back of triple-quoted string docs and a few clarifications.

Each cap is set with ~10% headroom over current weight so a single
follow-on doc-pair addition does not flip CI red. The aggregate
TOTAL_LIMIT goes from 15000 to 16000, well above current total 11239.

The split-by-category design holds - typical task load is still 1-2
modules at ~2-3 KB each. The bumps reflect deliberate surface-area
growth in 0.12.x and the comment is updated to say so.
PR #560 added the crypto cluster (sha256, hmac-sha256, b64, b64-dec,
hex, ct-eq) but did not update the SPEC.md reserved-namespaces table
to include the two new 3-char short names. regression_reserved_names_doc
catches this drift but was masked behind the examples/crypto-primitives
panic in CI fail-fast ordering.

ai.txt regenerated by build.rs.
SKILL.md has grown past the original 8 KB cap with 0.12.x doc
additions - HTTP verb cluster, getx/pstx, crypto primitives,
calendar arithmetic, the headers + jpth quick-reference block.
The cap exists as the guardrail against re-monolithising back
toward the pre-split ~50 KB shape, not as a hard token budget,
so it gets bumped in step with deliberate additions. 12 KB
keeps a healthy margin under the pre-split monolith.
@danieljohnmorris
Copy link
Copy Markdown
Collaborator Author

Superseded by #579 (B64Dec bridge fix already merged)

@danieljohnmorris danieljohnmorris changed the title hotfix: unblock main CI — VM b64-dec! panic + doc/skill caps hotfix(lint): bump modular-skill token caps + SKILL.md bootstrap cap May 21, 2026
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