Repository navigation
Fix Lerna update and CI issues - #17
Conversation
- Update Lerna from 6.6.2 to 8.2.1 - Update Node.js engine requirement to 18+ - Change postinstall script for Lerna 8 compatibility - Add robust example validation for CI - Add helper script for Lerna 8 migration - Add diagnostic workflow for CI troubleshooting - Update CI workflow to use Node.js 18+ and 20+ 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…regenerate package-lock.json
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
I've addressed both review comments from Copilot:\n\n1. In visualize-config-simple.js and visualize-config.js: Updated the regex to account for both Unix and Windows newline characters\n2. In diagnose.yml: Removed the redundant ajv-cli installation since it's already a dev dependency in package.json\n\nThank you for the helpful suggestions! |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Summary of fixes for PR #17
All CI checks are now passing. This PR will close #7 and supersede #15 and #16. |
Fix Lerna update and CI issues
…sign that replaces every result-reducer
Joel's architecture, dictated across this session and written down before any of it is
built, because I spent the session building the wrong three things first and each one
looked locally correct.
THE INCIDENT. A citizen mid-SWE-bench was handed her own directory listing as
`bytes":22592},{"kind":"file","name":"header.py"…` — head gone, opening mid-token, nothing
saying anything had been removed. She could not tell how many files existed, whether the
call succeeded, or that she was reading a fragment. Her prompt used 11,763 tokens of a
29,184 window: the window was 60% EMPTY while we shredded her results to fit a 1/32 share.
Mechanism: `ToolResult.content` is a `String`. Commands produce typed output, serialize
it, drop it in. Past that boundary the structure is gone and the only move left is cutting
characters — which two sites did with two different rules, one keeping the head and one
the tail.
THE THREE WRONG FIXES, all recorded because I attempted them in order and each is the
locally shortest path:
1. Tune the cut / keep the other half — both halves matter and which one depends on the
payload. Any fixed rule is silently wrong half the time.
2. A smarter generic reducer (shed elements, shed lines, mark the elision). Better, still
wrong: it cannot know a diff is atomic, that a patch reduced by half APPLIES CLEANLY
and does the wrong thing, or that dropping lines shifts the line numbers the next edit
depends on. Half a code fix is worse than none — no fix fails loudly, half a fix
passes review.
3. Raise the fraction 1/32 → 1/8. The same hardcoded guess with a different number; it
makes the corruption rarer and therefore harder to find.
All three are one defect: the substrate inspecting a payload it does not understand, and
deciding.
THE RULE: content never travels, a reference to its source does. A result is a small
header (always fits, always complete) plus a handle. The content stays where it was
produced; a mind that wants more calls the handle. Not a new mechanism — the one the RAG
and positron layers already use, one truth at the source and N projections. The
tool-result channel adopts THAT interface instead of growing a parallel one.
THE FORM IS A TRAIT, and this is the part that kills the whole bug class: nobody tracks
down where content came from and special-cases it. You hold the reference and call its
method; the source decides what a range means for its own content — lines for a file,
entries for a listing, hunks for a diff. Same interface for a peer's artifact across the
grid.
What falls out without special-casing: nothing is ever malformed; content size decouples
from context size (a 40k-line file is fully available on a 4k window, she pages);
indivisible payloads refuse and say how to narrow, decided by their own implementation;
and the act-history gap (#390/#414 — 2,863 acts executed, one visible, no path to the
rest) turns out to be a handle problem, not a memory one.
Build order starts at task #17 — reconcile HandleRef vs the URI-handle form — because
with two handle types this design forks on day one.
Nothing is wired yet, deliberately. The three reducers I wrote are reverted; the tree
carries the doc and the existing (wrong but honest) behaviour until the interface lands.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…s as a HANDLE
The substrate half of docs/architecture/CONTENT-TRAVELS-BY-HANDLE.md. Nothing is wired to
it yet; this is the interface plus the registry plus the three proving implementations,
all unit-tested.
WHAT IT REPLACES. A reducer that inspects content and cuts it down. That failed live
2026-08-18: a citizen mid-SWE-bench was handed her own directory listing as
`bytes":22592},{"kind":"file"…` — cut mid-token, head gone, nothing saying anything had
been removed, on a turn using 11,763 tokens of a 29,184 window. Cutting bytes breaks JSON;
cutting entries breaks a diff; cutting lines shifts the line numbers the next edit depends
on. Those differ by what the content MEANS, which only its producer knows — so no function
at the consumer end can be written correctly, and I wrote three of them before accepting
that.
THE INTERFACE. `ContentSource: header() -> ContentHeader, fetch(Span) -> Slice`. A caller
holds `Arc<dyn ContentSource>` and calls its method; it never asks what kind of content it
has. Polymorphism in place of inspection — same `cv::Algorithm` shape as search/vision/audio.
The header is what travels: kind, one-line summary, extent IN THE SOURCE'S OWN UNITS
(lines / entries / whole), and `fetch_with` — the exact call, written by the source, so a
consumer never guesses a parameter name. A `Slice` carries whole units plus `next`, which
is how a reader learns she has reached the END — the one thing a truncated copy can never
tell her, and why a citizen reasons about a fragment as though it were the whole.
THREE IMPLEMENTATIONS, chosen as outliers per CLAUDE.md's rule (build A and the most
DIFFERENT N; if both fit without forcing, the interface is proven):
A. TextContent — line-addressed, coordinates load-bearing. A slice from line 270 reports
from=270, so an edit built on it targets the right place. Pinned by a test.
B. ListingContent — entry-addressed, no coordinates, entries independent. Maximally
different from A. This is the exact shape the char-cutter corrupted.
C. WholeContent — indivisible. Its `fetch` refuses a partial read IN THE PRODUCER'S OWN
WORDS and names the remedy, because the producer is the only party that knows why.
This is the case that motivated the design: half a code fix applies cleanly and does
the wrong thing, so a partial read is worse than no read.
REGISTRY. `publish` parks a source and mints a `HandleRef`; `fetch(uuid, span)` derefs;
`release` drops it. A released handle answers "handle not found — re-run the call that
produced it", per the HandleRef lifetime contract, never a panic.
TASK #17 COLLAPSES, and not the way it was written. It asks to reconcile "URI-Handle vs
HandleRef envelope" — but only ONE of those is a live type. `HandleRef` already carries
owner + UUID + type_tag, `CommandResult::Handle` already exists and has four consumers,
and the grid routing is already specified (a handle minted on machine A routes the call
back to A). So a handle to a peer's content is the same interface as a local one, for
free, and there was no second model to reconcile.
12 tests green incl. ts-rs exports. Next: the `content/fetch` verb so a citizen can page a
handle, then the act seam mints handles instead of cutting strings, then the two reducers
get deleted.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Summary
This PR addresses both the Lerna update from Dependabot (PR #7) and fixes CI failures in a comprehensive manner:
Testing
All local tests pass. CI should now work properly with the improved error handling and diagnostics.
Closes
🤖 Generated with Claude Code