refactor!: delete legacy APIs and shrink storage footprint - #1963
Draft
ScriptedAlchemy wants to merge 65 commits into
Draft
ScriptedAlchemy wants to merge 65 commits into
ScriptedAlchemy wants to merge 65 commits into
Conversation
Lexical artifact rev 25 (compressed postings, block rows, clone tables in first build), sealed segments 4.02 GB -> 181 MB, retention keeps only the active generation, content-addressed sharing of segments/bundles/text artifacts across linked worktrees, and removal of every older on-disk format reader.
Removes released-store upgrades, old-shape readers, RetrievalAnchor V3, quarantine retention, superseded/stale diagnostic lanes and duplicated session payload copies. Older stores get a typed fresh-start refusal; nothing is migrated or backed up.
Host installers write only the current shape; .bak/original copies, registration backups, old-install sweeps and doctor residue checks are gone; CLI compatibility flags and aliases removed; one failing host no longer aborts install.
Single application invocation path, rmcp-only daemon connections with required auth, one MCP tool per capability, contracts without aliases or compatibility projections, cross-project code navigation over resolved_scope, and removal of re-export facades, forwarding wrappers and dead ports.
Dashboard reads only generated contracts, removes duplicate routes and dead fields; regenerated TypeScript SDK; docs, evals, scripts and lockfile updated for the removals.
|
Adds FileLease (unlock-then-close, fork-safe) and moves every drop-released flock lease onto it. Also checkpoints in-flight lanes: MCP tools onto ApplicationSurface, session storage, summary projection, store/automation/code-index/host second-pass removals.
Checkpoint: rmcp handshake guard fix plus in-flight lanes (MCP tools onto ApplicationSurface, session storage, summary projection, store/automation/code-index/host removals).
Budget-exhausted skips carry a typed stage instead of suffixed tokens; skill proposals use one field and verb set; skip rows write error only; GitHub CI type aliases and unused retention re-exports removed. Also checkpoints in-flight lanes.
Delete schema/SQL inventory tests that compare tables to themselves, self-referential re-export asserts, and Default pins. Replace weak non-empty checks with literal observed values, and prove a fresh temporal schema by writing and FTS-searching a summary node.
Catalog, contract, SDK, and API tests now assert observed schema titles, property keys, required fields, routes, binding IDs, and serialized packets instead of existence, counts, name inventories, or prose. Deleted fixture-vs-fixture feedback inventory, the always-loaded name list, Work description pins, the Work ID set compare, callable-code counts, the planner substring scan, the handoff route inventory, and the Work schema type-name pin. Also realigns callable-code and primitive expectations with the committed callees cutover: code_callees defaults to 100 rows and binds as callees on CLI/MCP; callees is no longer a primitive read.
Rewrite existence, count-floor, and is_some checks across the extraction suite to pin the literal names, docstrings, callees, and containment the extractors produce from each fixture. Pin the code-index language set, runtime exact-chunk paths, and source-edit failure messages; delete self-equality and constant-pin tests in query schema and graph-db.
Replace the temporal-mode enum snapshot and legacy-field absence checks with a behavioral test: an argument object admitted by the published lcm_load_session and lcm_grep schemas decodes through the CLI/MCP adapter to the same as_of cutoff, and the retired as_of_micros argument is refused by name.
The BASIC grammars lex `_` inside an identifier as an error token, so CONST MAX_RETRIES became RIES and LET MAX_RETRIES lost its prefix. A shared basic_identifier_text recovers the full lexeme around the parsed fragment for every QBasic, QuickBASIC, GW-BASIC, and MS BASIC 2.0 name. docstring_from_preceding_comments now accepts only comments that start their own line with no blank line before the declaration, so a trailing `} // namespace geom` no longer documents the next enum. clean_c_comment strips `///` (folding in clean_c_doc_comment), fixing GLSL, C, and Go doc text; protobuf drops its hand-rolled copy for the shared helper. Bump the affected languages' extractor revisions so indexes re-extract.
Replace count floors, non-empty checks, and docstring presence checks in the per-language extraction tests with the literal names, docstrings, callees, and edge endpoints each extractor produces. Drop contains-edge tests that re-extract fixtures already pinned in fixture.rs, and share edge_pairs for any edge kind.
Replace serde encode/decode round trips, as_str-equals-serde sweeps, is_some/non-empty/>0 checks, and constant inventories with literal wire values and observed results from the subject under test. - domain: session contract pins every wire form via assert_wire; relation edge kinds pin literal spellings; drop host and sanitizer disposition inventories - mcp: clone-lane codes, retryability, and detail are literal; pin lcm_doctor and run_affected_tests deadlines; bound-once names tools - daemon-service: census pins per-family counts; drop operation-name inventory - daemon-protocol: invocation payloads pin literal encoded bodies - application: pin stack snapshot anchor and unsupported sources - automation-runtime: receipt names the stored fact; typed error kind; literal merge body - configuration, dashboard-api, project: drop default and route inventories (and the dead route fields only they read); assert literal paths and stable project identity
Every transaction that moves a source cursor now deletes the advance rows the new cursor strictly supersedes. Only the row supporting the current frontier (which the invariant audit needs) and rows beyond it remain, so a store keeps about one row per source instead of one per record. The immutable-delete trigger admits exactly those deletes, which also retires the retention pass's drop/recreate-trigger step. LCM schema 11; older stores need a profile reset.
Replace the application-surface parity golden with one literal feedback_list dispatch across CLI, MCP, and HTTP, and inline the SSE and concealment literals. Delete the LCM name roster, description prose pins, retired-name absence checks, Work/Workflow count floors, the plugin/skills markdown shape scans, and files/affected tests that only checked key presence (exact outputs live in files_behavior_test and the central-daemon affected fixture). Align host_io_bundle_test with the two-argument HostIo writers.
rmcp lifts params._meta into the request context, so a stamped tools/call or resources/read that carried no params reached raw dispatch as {} and was refused as "missing 'name'" instead of "missing params for tools/call".
Protocol tests assert whole error frames, the tracedecay_retrieve input schema and a real retrieve page, and fold the logging-capability check into test_initialize. Hook fixtures send tracedecay/hookEvent as the stateless request the daemon hook client delivers; the rmcp route drops notifications before its first request, as production does.
Old per-scope code-generation-segments-v1 directories are an unsupported layout. Retention no longer detects or removes them; the sweep and census read only the project segment root. Drop the test that planted the old layout to watch it disappear.
The lexical page retained-bytes test now asserts the fixture file, its qualified symbol path, and the single widget-kit import. The attribution join test asserts the exact test-to-symbol records for alpha and Holder::get.
A connection opened by a SEP-2575 request (no initialize) makes rmcp 3.4 mark the peer request_metadata_required. Its blanket Service impl then treats every later request as inline lifecycle and refuses ping with method-not-found (invalid params without _meta) before ServerHandler::ping runs; only the pre-initialize loop answered ping. The handshake guard transport now answers every ping with an empty result, keeping the in-flight write on the transport so rmcp's select! cannot drop it mid-frame.
Split the temporal scene into a host that owns every button, label, toolbar, minimap and data attribute, and a renderer that owns only paint. The shipped paint moves unchanged into renderers/current.tsx and stays the default; ?loomRenderer=rail|weave|strata selects one of three exploratory renderers over the same deterministic layout: - rail: 32px graticule, banded session rails, orthogonal causal hairlines with printed non-EXACT grade tags, per-bundle histograms. - weave: continuous threads that bend out of their parent at the spawn instant, thickness by messages, brightness by recency, bundle ribbons by measured member sessions. - strata: extent bands and shared-scale bundle histograms filled by grade pattern, spawn junction plates, glyphs only where they resolve. density.ts adds the shared per-lane aggregation the three draw from and places NOW at the newest loaded record. A recorded-order cursor spans only its own lane. The overlay contract suite runs for all renderers.
tickStepFor accepted any rung under the calendar band that kept ticks 48px apart, but a 12-hour step prints 'Dec 28, 12:58 PM'-wide labels, so a 7-day window at 1196px overprinted. Each candidate now has to fit the pitch its own label format needs.
Three candidate registry-field renderers over one renderer-neutral scene, selected with ?field=sigma|points|atlas; without the parameter the Brain keeps its list-only surface. Sigma refined (rim program plus 2D underlay), a Canvas2D point field (one point per indexed unit, cached resting layer), and an instrument atlas (engraved plates, printed absent readings). The shared host owns keyboard traversal, the spoken reading, the legend and admitted activity: exact touched project plus one drawn hop, 4.2 s half-life, heartbeat and unscoped events never strike.
Adds three canvas renderers for the Code cortex field behind ?render= (relief, luminous, plate); without the parameter the shipped Sigma field is unchanged. The renderers share one scene model, camera, keyboard walk and typed states: a relief field of directory hulls over measured endpoint density with bundled cross-directory relations, a luminous additive point field on the shipped emergent layout, and a stratified plate with one printed depth basis and routed dependencies. The register names the active renderer's layout rule.
rmcp's CallToolResult has no extension members, so the problem record the dispatcher attaches beside content was dropped on the MCP transport and markdown refusals reached clients only as prose.
Land the rail instrument as the Loom's only renderer and delete the weave, strata and shipped glow renderers with the ?loomRenderer switch. - Semantic zoom is one rule: a lane that cannot hold legible glyphs (row under 22px, marks under 9px apart, workstream zoom) draws its density summary; bundles bar measured member sessions on one shared sqrt scale with unmeasured sessions dotted and exact totals in the lane column. Zooming or expanding resolves the same lanes to rails. - Luminance spends only on real quantities: recency within the loaded page ramps from half at the oldest start to full at NOW, and the selected causal chain lifts over it with a restrained cyan halo. Rails and links blend additively so only real crossings brighten. - NOW, the cursor and provider rail legends are engraved Archivo; every non-EXACT link prints its grade. - Edited files carry no edit time on the wire, so a lane with edits shows a typed edit_time_unrecorded gap instead of a guessed mark. - Fixtures: the Loom transcript matches LcmMessageV1 and is served for every session id, and the temporal page carries the subagent tree's own sessions past the dense threshold, so the audit draws spawns, a missing parent and a bundled branch.
Agents delegation topology gains three selectable renderers over the same fitted model: hollow descendant-scaled rings, a recorded-time timeline with spawn/join brackets and lane density, and a radial depth-ring field. Work's dependency board gains fitted, swimlane and matrix (DSM) renderers over the unchanged layered layout, typed-state card treatment, and the border-edge/rounded-sm token sweep. Current renderers remain the default.
The point field is the Brain's only renderer, for the registry and the scoped symbol graph; the Sigma-refined and atlas candidates and the ?field= switch are deleted. The card grid stays as the exact list. Crowded recency x mass cells now pack into rank-ordered grids with exact counts and resolve as the camera zooms; bodies grow as zoom^0.25 so members separate. Picking uses a spatial index, the rail list is windowed above 200 rows, and stores draw in the new --raw-graph-ice. Activity semantics are unchanged.
That commit picked up peer changes already staged in the shared index: agents renames and deletions and the cortex painter deletions, while AgentsPage and CortexField at HEAD still import those files. Restore them to their prior content; the owners' working trees are untouched.
Three candidate drawings of the Facts constellation over one fact scene joined from the served graph and rows, selected with ?constellation=: provenance cameras (category frames of rows on one zero-anchored trust rail), trust field (trust against row updated_at, disputes enumerated, entity zoom) and constellation lattice (force-settled entity hubs with fact satellites and per-kind bundles). Without the parameter the polar constellation is unchanged. All three lay out in screen pixels, so labels print at 10-11px instead of the 3.8-4.7px the scaled 1000x600 viewBox produced, and draw a withheld fact as violet crosshatch printed by identity, never content.
The Code cortex draws one renderer, the relief field: symbols inside their directory's hull, a relief of drawn relation endpoints computed and clipped per hull so two packed directories never share a ridge, one printed contour interval, and cross-directory relations aggregated into trunks whose width and brightness are the measured relation count. Kinds take the shared kindColor ramp plus shape glyphs; selection is a 2px cyan ring that lifts its neighbourhood, hover only dims the unrelated. Hubs get display-face labels, leaves appear on hover, focus or zoom, and the keyboard walk and ledger still reach every symbol. The luminous and plate explorations, the ?render= switch and the Sigma branch are gone; the register names the module-packed layout. CodePage asks the subgraph route for its ceiling, limit_nodes=250 and limit_edges=500, and the camera fits the hulls. The story fixture serves a 250-symbol slice for an explicit limit without changing the base 40-symbol slice or its degrees. Before merge: Hotpath-measure the daemon's 250/500 subgraph read.
Agents: rings become the topology default and Timeline a view kept in ?view; the radial and generation-disc renderers are deleted. Work: the DAG camera draws the fitted board and Matrix is its own projection; the swimlane and layered renderers are deleted. Ring cores, timeline bars and matrix cells brighten with measured counts; a selection lifts its subtree. Adds the dense-fanout subagent-tree fixture scenario.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codebase-wide "migrate callers, then delete the legacy API" pass. Compatibility with previous versions is treated as the lowest priority: fresh installs write only current shapes, older stores/artifacts get a typed fresh-start / rebuild refusal, and no backups or old copies are kept.
Draft — still converging. Several refactor lanes are finishing on this branch (MCP tools → single ApplicationSurface path, session-storage dedupe, summary-projection collapse, host install single path, code-index/store leftovers, flock lease fix). The workspace has not yet passed a full
cargo check/test run as a whole; per-crate checks and targeted suites pass for most lanes. Follow-up commits will land here, then a full verification gate before this leaves draft.What changes
tracedecay_code_*,body,outline,read,impls,callers_for), cross-project reads for code navigation viaresolved_scope, contract aliases / compatibility projections / wire clones removed, dead and single-impl ports collapsed, historical re-export façades removed..bak/original copies and registration backups removed, old-install cleanup and doctor residue checks removed, CLI compat flags/aliases removed (sync --force,tool query, time aliases, …), detected install continues past a failing host.Breaking changes
Shipped CLI flags, MCP tool names/arguments, HTTP routes, SDK paths and on-disk formats change without compatibility shims. Existing local stores must be rebuilt (typed refusal explains this).
Verification
Pending the full gate: workspace
cargo check --all-targets --all-features, crate + integration suites,contracts:check, dashboard typecheck/vitest, clippy, and review passes (Bugbot and security review already ran on an earlier snapshot with no findings).