Repository navigation
Conversation
A warm restart now loads a validated completed federation instead of re-running projection, peer matching, and cross-repo linking. The completion record holds fingerprints, not a second copy of the graph, and reuse is refused when the analyzer identity, schema version, configuration, repo set, HEADs, tracked contents, pattern overrides, environment analysis files, or LSP settings differ. `LAIN_REQUIRE_STARTUP_CACHE=1` turns a cache miss into a refusal instead of a silent cold index. Source watchers stay live after a cache hit, and a dirty worktree is never eligible for reuse. Extracted reference artifacts are shared across repos through a bounded, checksum-validated disk cache, and TypeScript ORM queries are compiled once per scan. Service-reference line numbers are counted incrementally rather than by rescanning the file per URL. Graph serialization is unchanged, so no federation schema migration is introduced. See docs/STARTUP_CACHE.md.
…urces JavaScript clients now resolve repository-local URL constants, named imports, CommonJS destructuring, object members, and simple zero-argument helpers through bounded syntax evaluation. URL-constructor replacement semantics and lexical scope are preserved, uncertain environment defaults stay uncertain, ignored or escaping import inputs are rejected, and an opaque URL is no longer rendered as a root request. GraphQL call extraction is bounded to its own string literal, so a SQL document no longer yields GraphQL consumers. WebSocket client callbacks no longer publish server providers, FastAPI keyword route registrations are recognized through configurable queries, and WebSocket, topic, and table suggestions stay within their own protocol. Unresolved results now carry the captured HTTP source expression and host. The contract analyzer revision advances to 10, which invalidates older snapshot analysis. Graph serialization is unchanged.
The harness measures cold and warm federation readiness on real repository revisions, recording executable hashes, repository commits, tracked file counts, per-launch timings, and peak sampled parent RSS. Readiness requires the exact expected repo roster with every repo ready, so a degraded, incomplete, crashed, or timed-out run fails the benchmark rather than reporting a number. Two harness tests cover the benchmark and the contract smoke scripts without building Rust, and CI now runs both. The evidence JSON records the baseline, the completed-cache implementation, and the concurrency comparison, alongside the contract correctness audit and its citation ledger.
The multi-repo flow pinned upstream master for two example repositories, so a change on either side silently changed what the acceptance claim meant. Both are now pinned to explicit commits, and the cross-repo blast-radius check names the symbol those revisions actually call. `lain doctor` assesses the persisted graph snapshot rather than a live daemon's in-memory graph, so the check now runs after the isolated MCP server has finished indexing and persisted that snapshot. Semantic search is asserted through `get_capabilities`, which reports its real state, instead of through an error string that a different failure could produce. The acceptance environment isolates the daemon with its own runtime directory and no shared instance, and the server log is captured so a cross-repo linking claim can be checked against what the server said.
The plan targets full static readiness within ten seconds on the measured checkout, with the field-lineage pass at four seconds and all other startup work at five, while preserving graph output, operation identity, source sites, and readiness semantics. It sets the constraints the implementation must respect: no new dependency, no persistent cache, no federation schema migration, and no reverting the existing Rust gRPC indexing work. The design record states the same bounds in the terms the sensors use.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
The revision 10 analyzer was measured on the same three NVIDIA revisions as the baseline and revision 9, with the federation reaching full readiness and the revision 9 detector assertions still holding. Unresolved entries fell from 41 to 40. One site left the list entirely, and 27 surviving sites now report their original source expression and host instead of a flattened label. Six sites changed their reported reason, and the section states plainly that the codes moved in both directions: four sites lost a `no_route_in_service` reason they never carried a service for, and two gained one. NAT-04 is recorded as only partly addressed. The non-test source binding that now exists is a heuristic match, so runtime coverage remains unproven and the strict gate's failure condition is no longer met rather than the gate having been exercised as passing. The measurement used a debug build because the release build did not finish inside its time budget; the analyzer output does not depend on the build profile.
Architecture healthComputed by lain — thresholds: min-fan-out=15 Capability readiness: ?/? ready across 0 repo(s) Server healthArchitectural observations (fan-out >= 15)PR impactBlast radius for 162 new symbol(s) across 23 file(s).
|
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.
Rebases the branch onto
devafter #390 landed, and lands three workstreamson top of it.
Federation startup cache
A warm restart now loads a validated completed federation instead of
re-running projection, peer matching, and cross-repo linking. The completion
record holds fingerprints, not a second copy of the graph, and reuse is
refused when the analyzer identity, schema version, configuration, repo set,
HEADs, tracked contents, pattern overrides, environment analysis files, or
LSP settings differ.
LAIN_REQUIRE_STARTUP_CACHE=1turns a cache miss into a refusal instead of asilent cold index. Source watchers stay live after a cache hit, and a dirty
worktree is never eligible for reuse.
Measured on the six NVIDIA repositories, release builds, LSP disabled, three
cold/warm pairs per federation:
Graph serialization is unchanged, so no federation schema migration is
introduced. See
docs/STARTUP_CACHE.md.Contract detection corrections
JavaScript clients now resolve repository-local URL constants, named imports,
CommonJS destructuring, object members, and simple zero-argument helpers
through bounded syntax evaluation, while URL-constructor replacement
semantics and lexical scope are preserved and uncertain environment defaults
stay uncertain.
GraphQL call extraction is bounded to its own string literal, so a SQL
document no longer yields GraphQL consumers. WebSocket client callbacks no
longer publish server providers, FastAPI keyword route registrations are
recognized through configurable queries, and WebSocket, topic, and table
suggestions stay within their own protocol.
The contract analyzer revision advances to 10, which invalidates older
snapshot analysis. Graph serialization is unchanged.
Benchmark harness, CI, and acceptance
scripts/eval/nvidia-startup-bench.pymeasures cold and warm federationreadiness on real repository revisions. Two harness tests cover the benchmark
and contract smoke scripts without building Rust, and CI now runs both.
The acceptance suite pins the two upstream example repositories to explicit
commits, asserts semantic search through
get_capabilitiesrather thanthrough an error string, and runs
lain doctorafter the snapshot itassesses has been persisted.
Revision 10 measurement
The revision 10 analyzer was measured on the same three NVIDIA revisions as
the audit baseline. Unresolved entries fell from 41 to 40, one site left the
list entirely, and 27 surviving sites now report their original source
expression and host instead of a flattened
GET /label. Six sites changedtheir reported reason, in both directions, and
docs/NAT_CORRECTNESS_AUDIT.mdstates each one.
NAT-04 is recorded as only partly addressed: the non-test source binding that
now exists is a heuristic match, so runtime coverage remains unproven. The
measurement used a debug build because the release build did not finish inside
its time budget; the analyzer output does not depend on the build profile.
Startup remediation plan
docs/superpowers/plans/2026-11-05-startup-remediation.mdand its designrecord are added. Tasks 1-3 of that plan are already in this branch; tasks
4-9 (scope-analysis memoization, consolidated graph views, shared source
content, hot-sensor migration, lazy Rust gRPC indexing, and the full gate
plus rollout) remain to be implemented and are not part of this PR.
Verification
cargo check --all-targetsclean.cargo test --test contracts_analyzer_digest— 3 passed.cargo test --test federation_startup_cache— 14 passed, covering cachehit, invalidation, dirty worktree, changed membership, and cold-versus-
cache-miss graph equivalence.
release PR's job.
🤖 Generated with Claude Code