Skip to content

Compiler integrity: no more wasted paid calls, real validation on shipped packets, v14 - #132

Merged
anantham merged 2 commits into
mainfrom
fix/fable-compiler-integrity
Jul 28, 2026
Merged

Compiler integrity: no more wasted paid calls, real validation on shipped packets, v14#132
anantham merged 2 commits into
mainfrom
fix/fable-compiler-integrity

Conversation

@anantham

Copy link
Copy Markdown
Owner

Compiler-slice integrity fixes, all red-proven: the fifth uncached billed call per phase (fully-cached recompiles billed N calls for N titles; failures destroyed 4 successful paid passes), the ripples schema/prompt self-contradiction (feature impossible under strict mode — now map-shaped, v14 prompt bump, OpenAI-dialect degradation disclosed), canonicalSegmentIds so the rich validator actually validates compiled packets (was vacuous), repair-layer agreement, retired-field prompt cleanup, and the strict-schema transform moved into the production adapter. Full suite green.

🤖 Generated with Claude Code

https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi

…ating what it ships

Integrity scan (compiler/sutta-studio slice), all fixes red-proven:

- P1: a FIFTH uncached LLM call per phase — a fully-cached recompile still
  billed one large call per phase to buy a title, and that call's failure
  discarded four successful billed passes into a degraded view. The
  phaseView call now runs only when a pass output is actually missing;
  its failure degrades the TITLE, not the phase. Cost comment counts
  honestly. Red-proof: full-cache compile = 0 LLM calls (pre-fix: N).
- P1: the "RIPPLES — CRITICAL" feature was structurally forbidden by the
  schema sent on the same request (prompt/type/renderer/example all use a
  token-id map; the schema demanded an array of {tradition, rendering}
  under additionalProperties:false — under strict mode the model COULD
  NOT comply). Both schema blocks now use the map shape; the OpenAI
  strict transform drops open-map properties with a disclosure (the
  dialect cannot express them); the worked example's impossible key
  fixed. SUTTA_STUDIO_PROMPT_VERSION → v14 (v13's missing history entry
  backfilled) so caches invalidate and future benchmark runs are marked
  incomparable.
- P1: production-compiled packets were invisible to the rich validator —
  the compiler never set canonicalSegmentIds, and every deep check keys
  on it (vacuous pass on every compiled packet; the ledgered
  validator-weaker-than-the-system class). rehydratePhase and the
  degraded builder now populate it from sourceSpan; a new ERROR fires
  when a non-degraded phase has neither. Red-proof: 7/8 tests fail
  pre-fix, including a pali-corruption case the vacuous check missed.
- P2: the weak validatePacket renamed validatePacketIds; the RICH
  validator now runs (log-only) at compile end; validator version stamps
  unified ('1.0.0', was a fictional 'v1').
- P2: repair layers now agree — validatePhase delegates to the render
  backstop repairEnglishStructure, so dangling-linked tokens are dropped
  instead of surviving as undetectable empty pills.
- P2: TRANSLATOR_DEBATE no longer instructs per-sense fields the schema
  forbids; the retired sourceCitationIds wire-back docstrings now name
  citationIds honestly.
- P3: the false "dead skeleton.ts" comment fixed (it IS production, the
  "canonical" passes are not — all six now say so); zombie
  morphologyCache deleted; packet.compiler.provider recorded honestly;
  final progress no longer counts skipped/degraded phases as ready; the
  OpenAI strict-schema transform MOVED to services/ai and applied in the
  production adapter's chatJSON (the benchmark keeps its import via a
  shim) — production is now immunized against the 400 class the
  benchmark already survived.

tsc clean; full suite green; build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexicon-forge Ready Ready Preview, Comment Jul 28, 2026 7:41am

…ts) + pilot-scoped rich validation

readySegments now counts unique canonical ids landing in non-degraded
phases (per-phase += overshot totalSegments when wordRange split one
segment across phases); rich validation now runs against the segments the
retained skeleton actually covers, so pilot mode (phaseLimit) no longer
flags every deliberately-uncompiled segment as missing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
@anantham

Copy link
Copy Markdown
Owner Author

Codex findings adjudicated — both real, both fixed: readySegments counts unique canonical ids (wordRange splits no longer overshoot totalSegments) and rich validation is scoped to the retained skeleton's covered segments (pilot mode no longer self-flags). Compiler + sutta-studio suites green.

@anantham
anantham merged commit 1bdcfe1 into main Jul 28, 2026
1 of 2 checks passed
@anantham
anantham deleted the fix/fable-compiler-integrity branch July 28, 2026 07:48
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