Repository navigation
Server: lease directories and TBA keys to live MCP sessions - #19
Open
caparomula wants to merge 304 commits into
Open
caparomula wants to merge 304 commits into
caparomula wants to merge 304 commits into
Conversation
Clients grant temporary permissions through loopback-only HTTP registration, never tools. Session removal and registration share the per-session map lock, so DELETE, expiry and transport shutdown revoke permissions without a late registration restoring them. Cached reads are revalidated too. Listings, store discovery, imports and inboxes see the dynamic directory set. connect now loads shared-server settings only from home or --config and passes that exact file to the spawned daemon. Project YAML contributes only top-level logdir/team, combined with bridge flags and resolved against its cwd. Repeated initialization registers again; EOF deletes the session. The daemon records an ignored project servers section without receiving project secrets. log_directories now carries path/origin/team objects; log_directory_paths retains plain strings. Updated the extension's pure readers in this commit so both server versions remain usable. Per-path teams were agreed with the maintainer. Most-specific directories win, with newest leases breaking ties; the newest live key wins, and a null key clears only that session's override. Verified on macOS: ./gradlew build, 2310 tests, 71 opt-in skips, zero failures or errors; npm test, 298 passed, zero skipped/failed. Real HTTP tests exercise admission, cached-read revocation, independent leases, team precedence, Origin/bind refusals, malformed input, canonical paths, imports and the inbox. A real packaged bridge/daemon uses scratch home/project directories and a conflicting project port; URL sessions, flags, project teams, reinitialization and cleanup are checked. A fake TBA API records the actual key header and the test captures real server logs and result bodies to check confidentiality. Observed 32 production plants and two TypeScript plants fail runtime checks: omitted admission; cached/unrestricted reads after revocation; missing session cleanup, early deletion or replacement; wrong origins/per-path/cached/logged teams, specificity and cross-session removal; unresolved/outside symlinks; removed loopback/Origin/session gates; accepted files/fractional teams; wrong key precedence/clearing, leaked keys and unsafe header values; disabled inbox polling; project-selected startup, missing explicit child config, dropped bridge registration/flags/project team, retained bridge sessions; missing removal callback; and broken rich-directory decoding/plain-path compatibility. All plants were restored. Initial full-suite failures in REV discovery and metadata identity were corrected before the final build. Not verified: native Windows, real VS Code, live TBA, and opt-in real-log/stress suites. Tests use synthetic logs/keys, scratch installs, and local fake services.
The JAR now owns VS Code lookup as well as the install layout. The release scripts select an exact tag or the newest public release, optionally fetch the matching VSIX, and prompt for directories, team, and extension install in a terminal. Gradle installExtension delegates to the same verb. Explicit --refresh stops recorded daemons, marks install/start guards before closing their handles for Windows, backs up the whole directory, and copies settings byte for byte into a fresh layout. New starts cannot claim the old layout after its guard is marked. Ordinary updates do not stop daemons or refresh. Refresh refuses a downgrade without --force and must run from a JAR outside the installation. Backups are retained even after a failed rebuild. Verified: ./gradlew build: 2324 tests, 71 skipped, 0 failures/errors; npm test: 298 passed, 0 skipped/failed. Scratch-home subprocess tests run the actual JAR and generated launcher, stop a real daemon on refresh, and drive both scripts against fake GitHub downloads and fake VS Code CLIs. Both platforms' lookup/quoting rules are pinned. PowerShell ran on macOS. All 34 Java/script plants plus the Node bootstrap/refresh-argument plant failed their intended checks, then were restored. The two new option checks first failed on the old parser. git diff --check is clean. Not verified: native Windows cmd execution, actual VS Code installation or its UI, live GitHub downloads, and opt-in real-log suites. CI must check the Windows launcher; a person must try fresh interactive installation, tagged bootstrap, and refresh of an existing install on each supported platform. Decisions: preserve existing settings exactly rather than rewrite comments or secrets. A basic legacy JAR still uses its tagged installer; new options require a release carrying the verb. Only an Unknown option refusal triggers legacy fallback, so real write/refresh failures cannot launch a second installer. Noninteractive runs never prompt. --with-extension requires an explicit VSIX and the extension's own calls never pass bootstrap or refresh.
…irectories Remove the private daemon, its configuration writers, project MCP entry writer, and useStandaloneServer switch. Every window installs/updates the standalone layout, starts http with the home configuration, and registers its directories, per-path teams, and secret-storage key before publishing its HTTP definition. Changes replace the lease; disposal releases it. Reconnect and heartbeat restore registration, and serialized updates cannot leave older inputs in force. Register Claude Code's bridge once at user scope, or show a copyable command. Offer project YAML containing only the project's directories and team. Existing and tracked files are kept. Show configured/leased origins and teams in Logs. The real-client test also caught health_check consulting only the configured TBA key; it now reports the live client's availability. Verified: ./gradlew build (2,324 tests, 71 opt-in skips, no failures/errors), npm test (239 passed, no skips/failures), git diff --check. Fake HTTP and real-JAR clients verify directory/key registration, third-session visibility, revocation, reconnection, cleanup, refusal words and secret redaction. Fake launches with real health/PID files verify single-flight preparation, start failures and ordered manual restart. The new health_check assertion failed on the old code. Watched 54 isolated plants fail and restored them: omitted User/project roots, wrong/missing per-path teams and Windows deduplication; refresh/no-op/session and setting selection; Claude scope, Windows bridge/shim, command quoting and lookup; project offer branches, YAML escaping/team filtering and gitignore; missing/repeated registrations, reconnect, disposal, error cleanup/redaction, stale handshake updates, overlapping refreshes and tool ordering; manager single-flight/failed starts/restart order/failed stops; tree origins/team/nested roots; install offer/update/keep decisions; manifest command/settings/links. A queue test originally missed the serialization plant; a latched provider with immediate exchanges now forces it and fails without the queue (no timed sleep). Not verified: real VS Code (oldest supported/current), native Windows execution, live Claude CLI or Marketplace/release downloads, opt-in robot-log suites. Manual checks: fresh install and offer, Copilot's listing of leased directories, project logs appearing/disappearing with a window, key reaching get_match_info without a file, Claude user registration, terminal bridge with VS Code closed, and explorer/organize UI against the shared server. Native paths/command words are covered under both platform rules, not by a native Windows shell here. Decisions: remove idleExitMinutes too, since idle policy now belongs to the permanent YAML. Seed only absolute User roots into a new install; relative project roots remain leases. Project YAML is offered once and then user-owned, never rewritten on settings changes. Settings UI does not edit servers.yaml; Java/heap settings run the installer and the installed launcher runs the daemon. Legacy migration and the complete documentation rewrite follow in commit 4.
The old project bridge entries and private configurations could survive the switch to the standalone http server. On project open, remove only the named wpilog-analyzer entry whose args run connect vscode-default, or connect http --config with a path inside extension storage. Canonical paths decide ownership. Preserve every other entry, tracked/custom/malformed files and symbolic links, with a note. Recheck the file and git state before writing. Stop the recorded vscode-default daemon once, then remove servers/ and projects/ and the remembered project settings; keep them and retry next activation after a failed stop. Rewrite the user guides around the normal path: logs in ~/riologs, one server started automatically, and permanent settings in home YAML. VS Code Settings supplies session leases and never reads or edits servers.yaml. Document the installer's prompts, tag/prerelease selection, one-way bootstrap/update flow, preserved settings, explicit refresh/backup, Claude user-scope registration, project YAML, migration, and uninstall. Remove superseded plan sentences and mark milestone 7 done with the real-VS-Code checks still outstanding. Keep the Organizing Your Logs section unchanged. Correct stale heap, idle-exit, key, health availability, and Windows mapping documentation too. Verified: ./gradlew build --rerun-tasks (2,324 tests, 71 skipped, zero failures/errors); npm test (246 passed, zero skips/failures); git diff --check; all local Markdown links in the ten changed guides resolve; organizing text matches the prior section exactly. Migration decisions use recorded synthetic JSON on POSIX/Windows path rules, including relative and case/separator forms. Watched 22 plants fail, then restored them: wrong entry/private-daemon names, discarding other entries, modifying tracked or git-unclassified files, ignoring ignored files, resolving a relative config against the wrong cwd, treating the storage root/sibling/other drive as inside, ignoring a canonical symlink target, throwing on path resolution, deleting custom or mixed-argument entries, echoing malformed JSON in a note, accepting invalid document shapes, changing an absent file, repeating cleanup, stopping when no daemon is recorded, removing settings before stop, removing after a failed stop, and skipping successful cleanup. Earlier milestone checks still pass, including the real-JAR client. Not verified: real VS Code (oldest supported/current), native Windows UI/CLI, live Claude registration/Marketplace downloads, or opt-in robot-log suites. Manual checklist is in DEVELOPMENT.md and EXPLORER_PLAN.md: fresh install, updates/newer install kept, third-session lease visibility, folder/key changes, get_match_info without secret files/arguments, Claude registration and terminal bridge with VS Code closed, YAML/ignore offers, legacy project migration and stop retry, and explorer/organize behavior. Pure decision tests do not claim to have driven VS Code's filesystem/notification integration. Decisions: when git cannot classify a file, leave it, since only untracked or ignored files were authorized for retirement. Leave the JSON file even when its MCP map becomes empty, preserving other top-level fields. Remove private settings, but keep old server/ and cache/ folders for retained unrecognized entries; the uninstall guide explains when to delete those. Do not mark cleanup complete until the stop and removals succeeded. No pit-server branch or code was created.
…ections With milestone 7 the extension stopped running the JAR itself and starts the standalone launcher instead, so `wpilog-mcp.maxHeap` only reached the installer: a user with large logs had no setting that sized the server. The extension now puts the setting in the launcher's environment as WPILOG_MAX_HEAP when it starts or restarts the daemon, never on a command line, through a pure builder with a test (fails when the variable is dropped). The spec is rebuilt on every start, so a changed setting takes effect on the next Restart Server. The setting's description, the settings table, the architecture guide, and both troubleshooting lists say so. Documentation corrections from proofreading the milestone 7 rewrite: the README regains the sentences that said wpilog-mcp is designed for Claude but works with any MCP client, that ChatGPT needs the HTTP transport, that a particular .vsix installs from the releases page, and that Log Directory is the alternative to ~/riologs; the standalone guide regains its "designed for Claude" note, names the clients outside VS Code, keeps the lease rule out of the logdir default cell, and says plainly when the installer prompts; the changelog records the breaking shape change of log_directories (objects) and log_directory_paths (strings); the architecture guide replaces the "earlier unrestricted mode" sentence with the rule it meant; the explorer plan's decision 5 regains the servers-list draft and why one server with directory leases is enough. Verified: npm test (247, the new test fails with the builder's variable removed), tsc, ClaimChecksTest, the extension version and usage tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wo6ufDtEY27NQ8ctU5ns5
The pit server needs an ordered, lossless NT4 listener before a capture writer can trust it. There was no NT4 layer, retry lifecycle, clock mapping, or robot fixture before this milestone. Start from origin/wpilog-explorer (9a5a3e5), with its store and lease work, and keep the implementation on pit-server. The milestone-start explorer merge was already up to date. Add I/O-free control/value records, authoritative announcement type mapping, and the MessagePack subset written from the published specification (no codec library). Bound wire sizes, nesting, and decoded objects; preserve unsigned 64-bit MessagePack integers and exact float bits. The JDK WebSocket client negotiates 4.1/4.0, synchronizes before subscribing and every three seconds, retries ordered address sweeps forever, and delivers listeners on one daemon thread. Keep a concurrent latest-value table separate from the lossless stream. Add pure gateway subscription/fan-out transitions and a loopback socket adapter. Choose org.java-websocket:Java-WebSocket:1.6.0: maintained upstream, MIT license, 140,686 bytes (137.4 KiB) for the published JAR, and only the SLF4J API already in this project as a runtime dependency. It supplies RFC 6455 without a whole HTTP stack; all imports stay in nt4/server. Preserve its notice at the unique META-INF/licenses/Java-WebSocket-LICENSE.txt path in the shaded JAR. The existing dependency-submission job will cover it when merged to main. Protocol takes precedence over the abbreviated plan: greatest-timestamp cached values (ties replace), cached:false, hidden $ topics, overlapping-subscription deduplication, initial RTT before subscribe, and 4.1 ping/pong with no WebSocket pings on 4.0. Changing a subscription also re-evaluates queued changes. Malformed JSON neighbors are ignored, including wrong parameter shapes and nonnumeric periods; unsupported uint64 IDs/codes are ignored rather than disconnecting. The encoder's unsigned CE timestamp is equivalent to the protocol example's signed D2, and both are checked against hand-encoded bytes. Record choices in PIT_SERVER_PLAN section 17: separate server socket; 30-second offset window with newest minimum-RTT tie; 1/2/4/8/10-second retry; 4.1 pings at 200 ms with a one-second timeout, 4.0 time replies with a ten-second timeout; private publish acknowledgement sinks and truthful unchanged-property replies; bounded codec and minimum-period per-client batching. NT4 has no write-refusal message, so nothing from those private sinks enters the upstream topic table. Verified: ./gradlew build on WPILib Java 17 (including license and all existing tests); an earlier full build on Java 21; 89 NT4 checks, with all 23 generated corpus logs plus synthetic pace/struct/all-type fixtures over numeric loopback. Compare every announce, value, timestamp and raw WPILOG payload, not just call success; preserve deliberate truncated-tail and malformed-struct fixtures. Also check hand-encoded JSON/MessagePack, all widths and length boundaries, large fragmented values, both type directions, schema decoding, sampled/all clients, read-only writes, callbacks, fallback, injected-clock reconnects and keepalives, and a planted server offset within the measured RTT. Made and observed 51 deliberate faults, with every one of the 89 new checks seen failing: wrong tags/widths/endianness/float bits, missing resource limits, wrong families/type mapping/property deletion, malformed-control handling, clock sign/RTT/tie/expiry, lost all changes, extra sampled changes, ignored periods/topics-only/hidden-topic rules, stale retention/cached:false, lost subscription options and pending cleanup, upstream write leakage/false acks, lost unannounce flush/ID reuse, wrong gateway clock, reversed addresses/reconnect order, backoff/fallback/sync failures, stale client state, listener failure halting retry, disabled keepalive, permissive handshake paths, phantom topics, shifted replay timestamps/pacing, and truncated fragments. All plants were restored. Local audit logs are under build/reports/nt4-mutations/. Five review regressions were also observed failing before their fixes. Not verified: a real robot/ntcore server, real dashboards, or native Windows. No robot logs or values were used or added; fixtures use the pure-Java WPILOG writer. No startup, configuration, capture, sessions, live log, store, pulling, identity, tools, metrics, or extension behavior changed. The gateway remains a fixture; complete metadata topics and production integration belong to milestone 8. Architecture, test documentation, plan status, ideas, and one Unreleased/Added changelog entry describe this boundary. Specifications and dependency: https://github.com/wpilibsuite/allwpilib/blob/main/ntcore/doc/networktables4.adoc https://github.com/msgpack/msgpack/blob/master/spec.md https://github.com/TooTallNate/Java-WebSocket/releases/tag/v1.6.0
Every reconnect used to start at the first configured candidate. A laptop without mDNS therefore retried a failed name lookup on every robot reboot, even after the IP address had connected successfully. Remember the candidate only when the NT4 handshake succeeds. Each new sweep tries it first and then the other candidates in configured order; before any successful connection, sweeps retain the original order. Keep the existing backoff and connection-state cleanup. Update the client Javadoc, architecture guide, changelog, and plan section 4 to agree. Record in plan section 17 that the NT4.0 three-second time exchange and ten-second response timeout are our choice: WPILib's networktables4.adoc recommends one and three seconds for timestamp-based aliveness. The timers are unchanged. Verified on Java 17: flipped the loopback regression and saw the old code choose /first instead of the remembered /second. The expanded three-peer case also failed with planted cyclic fallback order (/third instead of /first) and with an out-of-order initial preference (/third instead of /second). Removed both plants; ClientTest and ./gradlew build pass. All reconnect delays use the injected clock, with numeric loopback addresses. Not verified on Windows, real mDNS, or a robot reboot. No robot logs or values were used. No capture, sessions, startup, configuration, or extension changes; milestone 2 implementation has not begun.
Bring the continuing explorer fixes into pit-server before session-writer work starts, as required at each milestone boundary. The incoming tip is 346add9: maxHeap now reaches the standalone launcher when the extension starts or restarts the daemon; previously the setting only sized the installer. Its proofreading corrections align the guides with the shared server and directory leases. The merge applied without conflicts. Verified the merged tree with ./gradlew build on Java 17: 2,413 tests, 74 skipped, no failures or errors; all 89 NT4 checks passed. TypeScript compilation and all 247 extension tests passed using the installed Node 24 runtime and the same compiler/runner as npm test (npm was not on PATH). Also removed the incoming launcher heap override temporarily and watched the maxHeap regression fail, then restored it and reran the full extension suite successfully. No planted faults remain. Not verified on native Windows, in a real VS Code session, or on robot hardware. This opens milestone 2 with the current explorer base; it adds no session writer, live log, capture wiring, or other milestone 2 work.
The client had no capture listener, and WPILib's DataLog writer would add a JNI requirement to an install which deliberately ships only Java. Add WPILOG 1.0 output from the published datalog.adoc, with complete-record offsets for the next live-index step, while keeping the fixture writer independent. Preserve announced types, NT: names, values and server times. Use the initial time-sync reply for reconnect continuity: a retained topic value can be old even on a healthy connection. A nondecreasing server clock within five seconds of expected elapsed time resumes with new entry ids; a reset or larger discrepancy starts a new session. Close/flush on drop, flush every 250 ms, and log sixty-second topic rates every five minutes. Exclusion and longest-prefix thinning are explicit, with period metadata. Wrong MessagePack value families are counted and dropped by the client without disconnecting or losing the next frame. The differential oracle exposed a fixture replay gap: wpiutil's iterator skips a final record shorter than 16 bytes. Walk full record boundaries in the replayer and its protocol oracle; the captured corpus now includes those values. The WPILOG specification's one-byte control discriminator and concrete layouts take precedence over its stray sentence saying four bytes. Both independent readers validate the resulting files. Verified: ./gradlew build on Java 17; hand-encoded bytes and all payload families; all 23 generated fixtures through gateway/client/writer checked by the differential reader and wpiutil; injected clocks for session, flush, thinning and cost checks. Observed 25 planted faults fail, covering 52 new/strengthened checks: headers, every payload family, width, clock continuity, exclusion, thinning/metadata, flush/report timing, minute expiry, wrong-family disconnect, capture timestamps and replay timestamps. All plants were removed. Enable the existing CI Linux/Windows matrix for pit-server pushes so Windows validation can run at each step. Not yet wired to startup or the store, and no live LogData yet: these are steps (b) and (c). No robot logs or values, context entries, extension changes, pulling or identity work. Native Windows and the user's shop stress test have not been verified locally.
A recorder previously had no configured start path or durable session listing. Capture configuration now chooses the robot, store, subscription and retention policy; HTTP starts without a robot and shutdown waits for the writer to flush. The store joins the server's allowed log directories. Capture requires HTTP and no idle exit so recording outlives MCP sessions. Use the existing store queue, security checks and move reservations. An additive open_capture field keeps unfinished files separate from verified hash/size records, preserving store format 1. Event and match enter the manifest before the cosmetic directory rename; a Windows refusal retries after close. Same-second sessions get a suffix. Address identity remains provisional. Verified ./gradlew build on JDK 17: 2470 tests, 74 skips. A packaged start/stop with an empty native-library path serves HTTP with no robot, then captures a loopback fixture and finalizes its manifest. Thirteen planted faults failed: configuration/default/inheritance/HTTP/doc keys, placement/open manifest/rename/ store version, omitted start and shutdown wiring, and the two adjusted Windows checks. Plants restored; the full build passed. The first branch CI passed Linux but exposed Windows source-encoding and two existing test file-lifetime assumptions. Set JavaCompile to UTF-8; inspect an install guard only after unlocking it; give each endpoint parameter its own fixture instead of rewriting a mapped file. Native Windows verification follows on this push; the actual shop robot is unverified. This step does not yet serve LiveLog, add live tools, pull logs, infer serial identity, wire the gateway, alter import policy, add context, or change the extension. The next step attaches the writer-built live index.
Reading a growing capture through the ordinary file loader repeatedly scanned it and could discard a correct answer merely because another record arrived. The writer now publishes the entry table, record offsets and decoded hot values into LiveLog. Each acquisition captures a global publication boundary and caps each entry's first-touched length at it, keeping schemas and the reported input time range consistent with the values used. The optional-path struct tool and multi-log comparisons report their live input ranges too. Older values use read-only mappings beside the write channel. Atomic mapping references protect decoders across remaps; short lifetime transitions protect retirement/resumption without holding locks across I/O. Time-sync replies also expire idle topics. Active indices are pinned; finished indices enter the normal cache, eviction releases their mappings, and an ordinary reload agrees. A Wi-Fi resume reuses the last writer index even after cache eviction. Canonical path aliases select the live index too, and an import cannot move its active writer. Verified the complete ./gradlew build on JDK 17 after restoring all plants. All 23 generated fixtures run through the loopback gateway, JDK client and writer, then both independent readers check the capture. 1873 argument variants across all 41 log-reading tools give equal open-session and fresh-file answers, except execution timing and the explicit live input range. Tests also cover concurrent append/late entry reads, hot and cold value families, idle expiry, schemas, redeclared types, forward clock jumps, held-reader retirement, mapped growth, eviction/reload/resume, and store renames with a live mapping. Thirty-two fault plants were observed failing and restored: unbounded prefixes, wrong ranges, missing live registration, spurious file-change discard, wrong offsets, skipped expiry, premature unmapping, missing resume mappings/cache, finished ranges, wrong type/jump handling, omitted documentation, shifted capture timestamps, every hot type family, and canonical-path lookup. Audit logs stay under ignored build/reports/capture-mutations-c. The previous step passed the native Windows Java suite. This push runs the new live tests there too; the existing Windows extension test still compares a DOS short-path alias with a canonical path and is outside this task. No extension code was changed. The user's real-robot shop stress test remains unverified. Cold reads keep the existing mapped reader's 2 GB limit. No puller, serial identity, context records, live tools, gateway startup, metrics, mirror, or other-process incremental rescan is added. Plan amendments and implementation choices are in PIT_SERVER_PLAN section 17; milestone 2 is marked done with the shop test noted.
The real-server test compared the directory the server reports with the test's temporary directory through Node's realpathSync, which keeps a Windows short-name alias such as RUNNER~1 while the server reports the long name Java's toRealPath resolves. On GitHub's Windows runner, whose temporary directory lives under such an alias, the test failed although both names are the same directory. The comparison now uses the OS's own resolution (realpathSync.native) and ignores case, for both the configured and the leased directory. Seen on the pit-server CI run for milestone 2 (the only branch besides main that runs CI); wpilog-explorer carries the same test. Verified: npm test on Linux, 247 tests. Not verified on Windows itself; the native resolution is what the Java side uses. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wo6ufDtEY27NQ8ctU5ns5
The milestone 2 Windows CI job compared a DOS short temporary path with its canonical spelling. Merge origin/wpilog-explorer through 25b1133 so that test compares canonical paths before the capture review fixes begin. Verified ./gradlew build and the extension TypeScript compile and Node suite. The first build timed out in the existing daemon concurrent-start test; its focused rerun and the complete build both passed. No capture behavior changed in this merge. Native Windows verification follows in CI.
A zero hot window remapped on every append, and the old tests could pass while every hot object was retained. Batch expiry on each 250 ms flush, count actual mapped decodes, and pin both the four-remap cadence and the values and timestamps read through those mappings. Address placeholders now say address rather than claiming a stated robot identity. Oversized WPILOG import, loading, and plain-directory listing share the explicit 2 GB mapping-limit reason; import rejects before hashing and never moves or places the refused input. Add windowed mapping after the gateway in the plan and ideas, with long offsets and small-window tests. Verified ./gradlew build (2499 tests, 74 opt-in skips). The new cadence, identity, and oversized-file regressions failed on the old implementation. Ten isolated plants failed their checks: retaining hot objects, expiry on append or time sync, skipping flush expiry, corrupting cold values, hiding or omitting the listing refusal, deleting a refused source, leaking a file into the store, and falsely listing address identity as stated. The sparse fixture writes only a small synthetic header and its last byte. The output claim check also caught read_error until tied to the sparse-file witness. No windowed mapping, robot identity, rollover, or manifest scheduling is implemented by this commit. No robot data was used. The explorer merge's Linux and Windows CI passed; this change's platform jobs follow the push.
The recorder waited behind imports on every flush and Driver Station value. An int-indexed live mapping also made an oversized capture fail repeatedly, and a writer IOException escaped as a connection failure and reconnect loop. Coalesce immutable manifest snapshots on the store queue, submitting changed facts immediately and progress at five-second intervals. Creation and resume remain synchronous; shutdown waits for the final close snapshot and hashes. Roll within the same session before the configured bound, reserving finishes, redeclaring active entries, and giving each file its own live index and hash. Retained schema seeds preserve independently decodable files and are marked in entry metadata. Keep NT4 connected after a write failure, record end_reason, and suppress recording until a new robot clock. Roll back partial records. Choose 1 GiB (1073741824 bytes) as the default max_file_bytes; reject bounds that cannot hold the active declarations, one record, and finishes. Defer cosmetic directory renames until close on every platform: asynchronous moves must not race rollover opens or mapping growth. These decisions and the additive manifest field are recorded in the plan and standalone guide. Verification: saw the old queue stall, rollover, escaped-I/O, configuration, missing-schema, and partial-write behavior fail the new regressions. Watched 36 additional fault plants fail, including missing shutdown waits, redundant manifest writes, wrong rollover timestamps/hashes, absent schema seeds, unrecorded failure reasons, invalid bounds, and unsafe open-directory moves. All plants were restored. All 23 synthetic fixtures pass bounded and unbounded loopback fidelity through the independent reader and wpiutil DataLogReader; all-tool live conformance still passes. The complete ./gradlew build passed 2538 tests with 74 opt-in skips, zero failures/errors, including license checks. No robot logs or values were used. Disk failure is injected, not a physical full-disk test. Linux and Windows CI will verify the pushed commit. Real-robot shop stress, windowed mapping, and milestone 3 remain outside this change.
Windows CI 37517752280 failed the bounded akit_match and akit_practice replays at ManualScheduler's ten-second wall-clock deadline. This charged all synchronous file forcing against a generic network-event guard, so a fidelity test accidentally imposed a filesystem-throughput requirement. The same commit passed Linux, and the Windows failures were the deadline assertion, not a changed value or a capture exception. Allow this replay sixty seconds for socket delivery and callback I/O, without advancing the injected NT4 clock or changing any fidelity assertion. Keep the ordinary event-helper default at ten seconds. Always drain client shutdown in a finally block, including when a replay assertion fails. Document the guard separately from the protocol timing checks. Verification: observed both old-deadline failures in the Windows test artifact before changing the helper. ./gradlew build passes locally again (2538 tests, 74 opt-in skips, zero failures/errors). The next Linux and Windows CI run checks the pushed revision. All byte, timestamp, order, schema-seed, file-bound, and independent-reader checks are retained. No production behavior changed. No sleeps were added to advance a clock, no robot data was used, and no real-robot shop stress was performed.
…cally A crash, power loss, or the daemon's ten-second stop deadline could leave open_capture forever, because close waited without bound for the store queue and no subsequent start finalized the manifest. Schema seeds also reused their boot-time timestamps, stretching every rolled file's range back to that schema. Sweep open captures on the store queue before constructing the NT4 client. Writer and recovery share a persistent per-file sidecar lease, an OS file lock, and a process-local claim. Skip owned files. Read an abandoned WPILOG before hashing it, preserve its bytes and incomplete-tail flag, keep prior files and session facts, take the range from LogScan and ended_at from modification time, and record "server stopped while recording". Unreadable or structurally damaged files stay open with their reason in the manifest and server log. Bound the combined writer/manifest shutdown wait to thirty seconds and log deferred work. Use the rollover server time for copied schemas, matching the redeclarations, and publish that timestamp to both the file and live index. Keep seed metadata and update the plan, architecture, standalone guide, tests guide and changelog. Ownership uses a separate persistent inode because the JDK FileLock contract allows closing another channel to a file to release its locks on some systems: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/channels/FileLock.html Canonical paths share claims, symlink sidecars are refused, and reader mappings do not touch the lease. Known capture leases are catalog metadata. This needs no dependency or manifest-version change. Incomplete last records are recovered; structural corruption remains open for inspection rather than receiving a hash. Verification: observed the pre-fix recovery/ownership/shutdown regressions fail, plus thirteen fixture seed-time checks and the per-file manifest/tool range. Watched 39 runtime fault plants fail, including missing recovery, stale sizes, hashes/ranges/endings, lost prior files, missing ownership, ignored shutdown bounds, boot-time file/index/manifest seeds, modified source bytes or mtime, rewritten closed sessions, and documentation drift. All plants were restored. A child JVM exercises cross-process ownership, forced exit, and lost queued manifests; its zero test deadline uses the production timed wait and pins the thirty-second default. All synthetic fixture replays and tool conformance pass. ./gradlew build passed locally: 2550 tests, 74 opt-in skips, zero failures/errors, including license and documentation checks. Linux and Windows CI will verify this pushed commit. No robot logs or values were used. No physical power-cut or real-robot shop stress was performed. The daemon stop deadline, puller, identity, gateway wiring and milestone 3 are unchanged.
Recovery scanned and hashed abandoned captures in construction, before Main opened HTTP. A large capture could therefore make the daemon health check time out even though the server was working normally. Queue recovery from start(), which Main invokes after HTTP is listening, and start NT4 only after the sweep succeeds. Report a failed sweep without starting the client. The one thirty-second close bound includes a pending startup sweep. Update the architecture, standalone/test guides, plan and changelog. Verification: watched the new real-HTTP health regression time out on the old code. With the store queue held, health now answers 200 while NT4 remains idle; releasing it recovers the planted capture before the client starts. An early-NT4 plant and three documentation-drift plants all failed. Existing recovery, process-exit, manifest and shutdown tests pass; ./gradlew build passed locally (2551 tests, 74 skipped). CI will check Linux and Windows on this push. No robot data, daemon timeout change, identity or puller behavior in this step.
An address and an SSH host key are not a robot identity. Plain-directory listings previously lost logged serials, captures stayed in address folders, and paths recorded in store moves still failed when passed back to a tool. Read serial/comments through the metadata roles everywhere. Add HAL-source device evidence, JSON context at file start and resume, address promotion at file creation barriers, durable path resolution, contact-key history, and manifest/logged disagreements with the file's own serial taking precedence. Read the roboRIO HAL sources at allwpilib v2026.2.2: serialnum in the process environment and PRETTY_HOSTNAME in /etc/machine-info. Exact unique fingerprint hints name their evidence and never assign identity. Store additions keep format 1 and older manifests readable. Verified ./gradlew build (2,567 tests, 74 opt-in skips), synthetic WPILOG/REV fixtures, context reload, mapped-file promotion, persistent aliases and file change checks, conflicts, host keys, and candidate ambiguity. Saw plain logged identity, closed-history promotion, disconnected identity, and guide checks fail before the fixes. Nineteen restored plants caught omitted context/moves, conflicts, key history, overflow, broken aliases, wrong HAL sources, ambiguity, fingerprint loss, missing listing evidence, and missing guide claims. The full build caught cached-log permission and conformance-coverage regressions too; both are corrected. Windows/Linux CI follows this push. This is milestone 3(a). No SFTP connection or puller is wired yet, no other context provider is enabled, and no real robot values or logs were used. HAL permissions and actual roboRIO behavior remain unverified in the shop.
A robot filename, its clock, and even a long common header can repeat on the next boot. The new read-only transport/local-storage ports keep transfer policy independent of SSH: whole-held-prefix hashes (a last-64-KiB fallback without exec), offset resume, content-recognized rename, retained generations on shrink/rewind/mismatch, one block at a time, injected-clock pacing, gate pauses, and durable per-serial progress. No remote deletion API exists. A stable listing pass precedes verification through the ordinary readers. Recovery accepting a partial tail is insufficient: verification requires a clean EOF and allows one full refetch. Add the REV reader's strict entry point without changing normal recovery behavior; bump sync cache format to 5 under the project's reader-change rule. Preserve the fallback's weaker evidence in the documentation. Verified ./gradlew build (2,584 tests, 74 opt-in skips). Every generated fixture crossed the fake transport byte for byte and reached the ordinary reader; the deliberately truncated fixture was refused after exactly one retry. Eighteen restored plants failed at runtime: short prefix, wrong resume offset, lost generation, missing rewind check, wrong fallback range, missed rename, ignored gate/rate, no retry, concurrent reentry, premature verification, manifest version, accepted WPILOG/REV tails, old cache epoch, and guide claims. A surviving rewind plant led to a stronger test with an identical held prefix; the revised test failed on the plant. Concurrent reentry uses a bounded call. This is milestone 3(b). The engine has no socket, sleeping clock, remote delete, or robot values. SFTP, the live gate, placement, and configuration are the next commit. Hardware and throughput under the robot's load remain shop checks.
The transfer core previously ran only against fixtures. A named capture server can now opt into copying the robot's WPILOG and REV files while NT4 reports a continuously disabled robot. Unknown state, a new connection, or enabled bit 0 closes the gate. SSH and store operations run on a separate daemon; identity context is delivered back to the writer's ordered loop. Transport shutdown shares the capture's bounded shutdown instead of blocking before its deadline. Use com.github.mwiede:jsch:2.28.7: the maintained single-JAR fork provides both exec and SFTP, Ed25519 and RSA SHA-2 on JDK 17, with no mandatory transitive runtime dependencies. Its artifact is 714,740 bytes. Main/JZlib code is under BSD-3-Clause and bundled jBCrypt under ISC; all notices ship in META-INF/licenses. Keep JSch imports in capture/pull. Preserve Multi-Release in the fat JAR: without it the shipped Ed25519 provider failed even though the development classpath worked. Existing dependency submission and Dependabot cover the new dependency. Source: https://github.com/mwiede/jsch/releases/tag/jsch-2.28.7 First contact trusts and records the host fingerprint. A change is reported before authentication; the subsequently read device serial selects continuity, so a reimage continues its pull manifest and a different robot does not. Default lvuser/empty password, configurable password or unencrypted key, disabled-by-default pulling, five-second settle, 1,000,000 bytes/s, and the three standard directories are parsed with key-specific errors and documented. Secrets are not printed. Partial copies stay under the serial's pulled directory until normal-reader EOF verification. Placement reuses the store queue, path validation, mapped-reader release and move reservations. Logged serial wins over device evidence, with conflicts retained across capture flushes. Same-serial strong correlation must identify one session within 250 ms of zero; captures anchor their sessions and matched members cannot chain offsets. Missing logged identity records data_alone. An unmatched log starts its own session. Confirmed growth removes the old session hash before staging/append; renamed and relocated files retain tool-path aliases. The additive source-device provenance keeps transfer ownership separate from a file's logged identity. Store format remains 1; shared sync cache advances to 6. The integration checks also exposed stale prefix proofs when a file grew during one transfer, and skipped content checks when a new contact reused both size and mtime. Both now recheck the held bytes before continuing. A verified pull used to be counted twice by the catalog; only staging now gets pull-manifest membership. Verified with the full Gradle build (2,633 tests, zero failures, 75 opt-in skips), the synthetic fixture transfer/normal-reader suite, fake SFTP channel, actual capture service over numeric loopback, live and finished session placement, cross-serial and ambiguous matching, REV offsets, verified growth/rename, context threading, shutdown, config and documentation claims, and Ed25519/RSA initialization from the packaged JAR. Regression tests were observed failing before the gate-word, packaging, catalog, shutdown, reentrancy, content-proof and offset-anchor fixes. All 44 additional targeted plants were caught and restored: config/secret handling, gate bit/settle/reconnect, SFTP links/filter/offset/range/hash/quoting/globs/key warning/identity/fingerprint, coordinator pin/gate/retry/stale contact, writer thread/disabled wiring/control, hidden staging/ownership/serial/basis/hash/correlation/ambiguity/offset/resume/ aliases/live conflicts/name normalization, all three license notices, the opt-in hardware property, and four guides. A range plant first survived because the test used a missing file; using an existing file and checking that no I/O occurred made it fail for the intended reason. A redundant gate guard needed an effective whole-gate mutation to change behavior. Not verified: roboRIO 1/2 permissions and SSH interoperability, robot CPU/network cost, or the user's shop stress test. SftpRobotTest is opt-in via -PpullRobot and its instructions are in DEVELOPMENT.md; pulling stays off by default. No robot log/value, native install requirement, remote mutation, system-log pulling, mirror, live tool, gateway wiring, or extension change was added.
The milestone 3 paths added whole-file scans to discovery, recursive SFTP listings per 64 KiB block, and correlation loads for distant sessions. Slow remote hashes hit a five-second idle socket timeout; learned identity blocked the NT4 loop to promote an open directory. Changed SSH keys also reached password/key authentication before their replacement was accepted. Read serial/comments within the 2000-record prefix. Persist import fingerprints additively in format-1 manifests and use only those store facts for candidates. Reuse a listing per pass, refreshing after ten seconds, and filter correlation candidates by manifest time overlap with import's two-hour/sixteen-hour clock slack. An unset REV filename clock cannot exclude a candidate. Write identity context in place and promote on the asynchronous session close update. Keep five-second connect/channel timeouts and use SSH keepalives plus a hash deadline of 30 seconds + ceil(bytes / 256 KiB) seconds. A changed key with a password or private key requires accept_changed_host_key or a cleared pin; empty-password contacts keep the reimage behavior. Removing a fingerprint is null-safe. Document robot-side hash CPU/read cost and all policies in the guides and plan, with a changelog entry per fix. Verification: all six regressions failed before their fixes. The byte counter saw over 22 MB read by one old listing; a fake remote pins the listing count; a slow channel advances injected time; twenty distant sessions must stay unloaded; changed keys must fail before authentication; a blocked store queue must not stop identity, values or flushes. 51 restored bug plants were caught, including a strengthened check that the deadline itself closes a blocked channel, not only eventual cleanup. ./gradlew build passed: 2646 tests, zero failures/errors, 75 opt-in skips. Linux and Windows CI will run on this push. No robot logs or values were used, no hardware/shop interoperability or load test was run, and pulling still defaults off. No milestone 4, remote writes/deletes, extension, live tools, or system-log pulling changes.
…lling from each other Two laptops in a pit with no pit server end up with the season's logs split between them by whoever pulled the stick. The plan now says how they coalesce: decision 17, a sync that pulls from a peer over the store's read-only HTTP door (the one the mirror already specifies), converging in any order because files are identified by hash and placed by serial and session as imports are, with a person's fields (a robot's name, a comment) taken only where empty and disagreements reported beside the identity conflicts. Nothing pushes, nothing is deleted, a mirror is never a target, and discovery is an address a person types. Milestone 6 now builds the door and the peer sync first, since they need no pit server and test with two daemons on one machine, then the mirror on the same door; the extension section gains the command; the explorer plan's milestone 8 mentions it. The roadmap's summary is left for the pit-server branch, which has rewritten that section. Verified: ClaimChecksTest passes, and a merge-tree dry run against origin/pit-server merges without conflict. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wo6ufDtEY27NQ8ctU5ns5
The ordinary fixtures did not exercise DataLogManager's real rename, desktop NTCore, or the SFTP adapter over an actual SSH connection. Add a separate GradleRIO 2026.2.1 / WPILib 2026.2.2 TimedRobot and a JSON timeline driving DS phases, delayed match data, deterministic typed topics and two process boots. Run it headlessly on Linux/macOS against a fresh synthetic roboRIO and the shadow JAR. Check HTTP MCP values and independent WPILOG record bytes against the timeline, plus schema decoding, device identity, session placement, verified near-zero-offset pulls, rename and the gate. Reserve the selected NT loopback port before RobotBase's default startup. Use test-only Apache MINA SSHD 2.20.0 (Apache-2.0): sshd-core 970864 bytes, sshd-sftp 394207 bytes, transitive sshd-common 966659 bytes. MINA 2.x uses net.i2p.crypto:eddsa:0.3.0 (CC0-1.0, 63292 bytes) for the fixture's fresh Ed25519 key. It serves rooted SFTP and exactly the puller's prefix-hash exec grammar, evaluated in Java without a shell. Real-SSH ordinary tests cover keepalives, injected deadlines, range reads and host-key policy; the earlier fake-channel checks remain. None of these libraries ships in the server. Add validated capture.pull.ssh.port, default 22, for the unprivileged fixture. CI runs a separate cached Linux harness job on pit-server and submits the robot build's dependencies as well. The harness exposed two integration defects: closing a capture renamed an already matched pulled file without preserving its pull.json path, and listing dereferenced an open capture's absent hash and could classify a matched WPILOG as a REV companion. Preserve aliases for all session files and share a null-safe, same-session, hashed REV association rule. Verification: both defects and the new SSH port check failed before the fixes. ./gradlew build passed (2662 tests, no failures/errors, 75 opt-in skips); the complete two-boot harness passed on macOS/JDK 17. Watched 47 restored mutation variants fail, including wrong values in all seven topic types and their HTTP results, shifted timestamps, empty pages, lost schemas, skipped reboot/rename, false identity, enabled pulling, default-port startup, stale callbacks, failed-session reset, SSH offsets, hashes, keepalives, deadlines, host keys, port validation, containment, REV associations, packaging and CI/docs. An escaped checklist plant led to a narrower claim check and then failed. Linux/Windows ordinary CI and the Linux harness run on this push. The reported one-off CaptureFailureTest assertion did not reproduce in 400 repetitions or the full local build. Pin callback order and record the server/receipt trace, without widening waits or claiming an unproved production fix; that investigation remains open in the plan. No robot log or value was used. Real sshd empty-password policy, lvuser /proc access, sha256sum availability, robot-side hash cost and shop/radio load remain unverified; pulling stays off by default. No NI-image container, PhotonVision, mirror, system-log pulling or extension changes.
Explorer advanced to a20957b while the shop harness was being completed. Keep its decision 17, store HTTP/peer-sync ordering, and extension roadmap with the pit branch's implemented milestones and harness decisions. The merge was clean; no plan decision or implementation was discarded. Verified: ./gradlew build is green on the merged tree; reran the claim, harness-wiring and pull-documentation suites for the changed guides. This merges planning only: it does not implement peer sync, the mirror, or extension commands, and does not close the unresolved reconnect trace investigation or substitute for the hardware shop checks.
The blocked-store test failed on Windows at its two-second deadline. It also performed forty native disk forces and zero-hot-window remaps inside that deadline, so the failure alone could not establish a queue wait. Keep real record writes and the live index, retain values for this queue test, and inject counted output flushes. Assert all forty ticks and the close flush happen while the queue remains blocked. The deadline is unchanged. LiveLogTest still covers actual flushes, expiry, mapping growth and cold decoding, including Windows. Verified: the revised queue test and the live-log suite pass; ./gradlew build is green. Planted a synchronous wait after manifest dispatch and saw this test time out, then removed the output's periodic flush call and saw expected 41 versus actual 1. Both plants are restored. Linux CI and the complete WPILib harness passed on the preceding commit; this push reruns Linux, Windows and the harness with this correction. No production behavior or timeout was changed. This is separate from the original, still unreproduced CaptureFailureTest same-clock assertion; no cause or fix is claimed for that report. Hardware shop checks remain outstanding, and no robot logs or values were used.
The harness agreed in conversation was recorded nowhere: a scripted robot in WPILib simulation, an emulated roboRIO on Apache MINA SSHD, and a runner whose verifier derives every expectation from the timeline. Section 16 now carries it, with what it proves and the short list it cannot. It also records the replay of real logs, two ways: through the gateway's server core as a fixture and through ntcore by the harness robot's replay mode. A real log is both the input and the expected output, so the checks are relational (the capture equals the source shifted by the known amount; the same log pulled from the emulated roboRIO matches the replayed capture with the shift as its offset; two logs with a clock reset make two sessions), and no value from a robot log enters the repository. Verified: ClaimChecksTest passes; the bullets sit at the end of section 16, after the lines the pit-server branch changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wo6ufDtEY27NQ8ctU5ns5
The replay work builds on pit-server's capture and store, while explorer continues to carry the shared plan. Bring origin/wpilog-explorer at 6fca17d into pit-server before implementing its harness replay requirements. Verified the merged baseline with ./gradlew build. This merge records the plan; it does not add replay code, change the capture configuration, or claim hardware verification. No rebase or force push was used.
Fixture-only replay missed real logger layouts, metadata changes, colliding names and rollover-size inputs. Add an offset-based independent replayer and a WPILib-reader/ntcore mode, exact payload and timestamp comparisons, HTTP checks, topic byte accounting, real SFTP placement, REV comparisons, and reconnects that keep one client and writer through two boots. The conformanceLogDir flag enables external inputs; reports stay under build. The new checks exposed dropped publisher properties, an unrecognized AdvantageKit publication prefix, NT:systemTime losing its calendar role, and missing automatic-placement refusal reasons. Preserve properties as WPILOG metadata updates, normalize the published prefix for nomination, retain the clock role, and expose matching_reason additively. Raise the synchronization cache epoch to 7 so earlier decisions are not reused. Use unchanged robot timestamps by default, inject the capture machine's calendar Clock, and measure signed small shifts. Keep the 250 ms rule: 240 ms is accepted, 260 ms and multi-second shifts are refused. Compare whole-source REV alignment to all rolled parts together, while HTTP tools still read one file. Incomplete inputs retain explicit verification refusals; invalid UTF-8 is reported as not losslessly replayable, never silently replaced. Native Driver Station checks preserve disconnected state across HAL notifications and decode match fields by their type. Verified: ./gradlew build and the complete native fixture/timeline harness are green; logger samples pass through both paths and real SSH. Full external-directory passes and per-file rechecks are recorded locally. Observed failures with planted payload/timestamp/record/schema changes, missing metadata and byte accounting, wrong collision mapping and calendar clock, clock-reset resumption, a widened placement limit, fabricated REV success, a partial rollover view, and the old cache epoch. Regression checks also failed before the fixes to metadata, names, clock lookup, refusal reporting, native watchers, DS state, and malformed-input handling. No robot file or telemetry value is committed. The gateway remains a test fixture; this adds no capture configuration, live tool, dependency or hardware claim. NI permissions, SSH configuration, radio behavior and on-device hashing cost still need the shop test.
The expanded all-sibling check kept parsed REV graphs for the source and for every rolled capture part. That exhausted the 4 GiB test heap on a large input even though capture fidelity had passed. Keep only paths and measured SyncResults between comparisons, and release each completed bus from the test sync caches after checking its HTTP result. The generated three-companion regression failed first with seven decoded copies retained where one was expected, then passed with one. The rollover and two-boot checks, ./gradlew build, the complete native fixture/timeline harness, and real gateway/native sample and pair checks pass. The full external-directory rerun and its counts remain in build/reports/replay. Document the allocation rule and clarify that refusing type-changing entry redeclarations is a current replayer limitation, not an NT4 rule. No source is excluded, no tolerance or heap limit is raised, and no server cache policy or protocol behavior changes. Hardware verification remains the shop test; no robot log or telemetry value is committed.
The first part of the column plan's phase 1. A column file holds a finished log's numeric entries and the numeric leaves of its struct entries as columns of int64 microseconds and 8-byte values, so a reader can take windows, pooled array elements and overviews without decoding the log or holding its samples on the heap. Nothing reads through it yet: placing the files in the disk cache, the background builder and the readers come next. The writer decodes each entry once, through the tools' own decode and stable time sort, outside the cache of decoded values. The first version went through that cache and ran a 4 GB heap out of memory on a 2 GiB team log whose one struct-array entry is nearly the whole file. Struct arrays of more than 64 elements a record, entries of more than 2^24 samples, and leaves that no kind holds exactly are left to the log. The reader maps the file through the log's own windows, checks the header, directory and footer on open and each section's CRC32C on first use, and refuses a crafted directory before allocating anything it sizes. An overview reads every sample with the data endpoint's arithmetic: the maintainer kept block summaries out, since their means differ from the endpoint's in the last bits, and kept the build's limits as built. Verified: every sample, a dozen windows and their overviews of every column on every fixture match the signal resolver and the endpoint's buckets, about 2 million samples; a log of edge cases checks hand-worked answers, and damaged, crafted, truncated and concurrently read files are tested; eighteen planted bugs each fail the tests. On three local team logs, read-only, 23 million samples matched, and twelve panels took 2 to 6 ms from the files against 0.1 to 1 s after a restart on today's path. The license check, these tests and the document checks pass on this commit's tree, and the full build passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer agreed on 2026-10-21 to name a log's derived columns column files. "Companion" already names the REV log paired with a WPILOG, as in the read API's companion_path, and the store also speaks of clock and system log companions, so a fourth meaning would have made the plans and the code ambiguous. The code already used the new name. The plan, the Grafana and columnar store plans, the ideas list, the decision index and the changelog now use it too, and the plan records the decision beside the first build's other two. Before, the documents said "companion" and the code "column file" for the same thing. Verified: the changelog, claim, decision-index, documentation-layout and operations-claim tests pass on this commit's tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reopening a large log from its persistent scan index first hashed the whole file with SHA-256, which made it slower than scanning the file again. As the maintainer decided on 2026-10-21, a finished log's index is now reused without reading the file when its size, full-precision modification time, file identity and creation time are unchanged since the index was written and checked. When only the modification time moved, or the file system cannot vouch for those attributes (no file identity, whole-second times), a CRC32C of the content decides before a new scan; anything else takes the SHA-256 proof. A file rewritten in place with all four attributes restored keeps its old index: that is the one decided exception, now stated in CLAUDE.md and the architecture guide. A store file's check against its manifest at admission is unchanged. The index format moves to 2, so older indexes are removed at startup, and both cache guards' baselines record the change. Built and verified in the decisions-and-fixes worktree, where the full suite passed (5,028 tests). A read-only timing on three local team logs reopened them from a trusted index in medians of about 30 ms, 140 ms and 0.5 s, against 0.13, 0.13 and 3.1 s for a fresh scan, with the logs unchanged. Applied onto development without conflicts; the full build passes (5,056 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first step of moving every reader onto column files with one code path. read_entry, charts and the data endpoint shared one bucket loop, native reads repeated it, and column files had a third copy; read_entry and the data endpoint each wrote out the same seconds window. Now every reduction fills its buckets through one shared fill, and read_entry, the data endpoint and column files take their windows through one seconds rule, reading samples from a decoded log or a column file through one numeric view. The column files' own overview is gone: they are bucketed by the shared bucket function. The fill computes a sample's bucket only when the sample leaves the current one, which gives the buckets of computing it for every sample, in or out of time order, and a boundary is computed in long arithmetic wherever that is exact. Answers are unchanged. Verified: the fill is checked against computing every sample's bucket afresh and its boundaries against exact big-integer arithmetic; the column differential tests now compare the shared function on both sources. Seven planted bugs in the shared code each fail tests. One of them, a native reduced bucket naming its last sample instead of its first, passed every existing test although the read API documents the behavior, so a test for it is added. The full build passes (5,058 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_statistics, compare_matches, compare_poses, align_entries and analyze_vision each computed their summaries with their own copy of the same arithmetic, and compare_sessions used a different one: a compensated sum without its final correction and a plain one-pass deviation. Now every tool reports the count, extremes, mean, standard deviation, median and percentiles from one implementation, and the circular statistics of angles from one too. The mean is the JDK's compensated sum with its final correction, so get_statistics' means are unchanged. The deviation is computed in one pass, as the maintainer chose so that compare_sessions keeps streaming within its caps, but on each value less the first and with compensated sums. Measured against exact decimal arithmetic, a plain one-pass deviation was off by 1 part in 10^12 for an encoder count at 10^6 +- 10 and 2 parts in 10^10 for a timestamp ramp, where this form and two passes were both exact. A single value's standard deviation is now null, as the project's rule on uncomputable values requires, where four tools reported 0; compare_sessions already gave null with a reason. Verified: the shared summary is checked against exact arithmetic on telemetry-like series, combined summaries, a mean that needs the final correction, the largest doubles and circular formulas, and each tool's single-value result is tested. Nine planted bugs each fail tests. On the fixtures' 237 numeric series, means are identical, get_statistics' deviations move by at most one unit in the last place except series of equal values, which now read exactly 0, and compare_sessions' deviations change by up to 4,177 units in the last place, to the exact value. The full build passes (5,069 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 2 of the column file plan's second checkpoint, as agreed: the files the readers of step 3 will use are now built and kept. Before, the writer could build a file but nothing did, and the disk cache's size limit was enforced only when the server started. A column file is named v<format>-r<recipe>-<sha256>-columns.col, by the content SHA-256 the scan index proved (a store member's manifest hash), so every copy of the same bytes shares one file and nothing of another recipe is read. The lazy log now names that proven content: a reused index, or a scan whose content was the same before and after it; a growing file, a read with the cache off and a file rewritten during its scan name none. The server asks for a file when it loads a log from its file and when a store publishes a session manifest (an import, a pull, an upload, a capture's close). Asking touches only memory, since a store asks on its own thread. One build runs at a time on a daemon thread of the lowest priority; it waits while the heap has less than 512 MB free and while a store would refuse a copy for want of recording's reserve. A build reads the log read-only, checks that it still names the requested content, publishes under the final name only when complete and only if the file's attributes did not change, then trims the cache to its limit (oldest first, any kind, keeping files readers hold). A path that cannot be read does not count against its content; a build that fails on the content, or a file the limit has no room for, is not tried again in the process. Shutdown interrupts a build first. The startup sweep removes column files of another format or recipe and counts the rest toward the limit. A new guard, like the scan index's, fails when a source that shapes a column file changes until the change is decided; its baseline is the first. The scan-index and REV sync guards record cache_unaffected: their sources changed only to name the proven content and to start and ask for builds. A session manifest's file path that cannot be resolved (a NUL, say) is logged and skipped: the store calls this after its turn, outside any observer's guard, and an exception would have escaped its publication. The regression test failed with InvalidPathException before the guard. Verified: new tests for the builder (12), its triggers through a read, a real store import and an unresolvable session path (6), the proven content hash including a file rewritten in place during its scan (3), the cache's naming, sweep and trim (4), and the guard. Each of 30 planted mistakes failed them, from a gate left open to a hash recorded before the proof, as did 4 planted in the guard and its baseline. ./gradlew build passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A capture's column file was meant to be built when it closes, and was not. A closed capture stays in the log cache as its in-memory copy until it is unloaded, and that copy names no proven content, so the build asked for at close found nothing to build from. A session renamed for its match at close was not built either: the build's final check compared the requested path, the session's old place, which no longer existed, so every such file was discarded as changed. The log manager now has a read from the file for work that needs the file's own bytes. It returns the cached log when that reads the file; for a finished capture still served from memory it opens the file again, privately and uncached, through the same admission and lazy open an ordinary read uses (now shared helpers), and closing the use closes it. A capture still recording is refused. Builds use it, and their change check compares the file the log was read from. The copy in memory goes on serving reads. The plan notes that a build holding a file, like any reader, can leave a session's folder unrenamed when it closes; its manifest keeps the match facts. Verified: new tests drive recorded captures through the capture writer and store. A capture held in memory and one renamed for its match are each built from the file and hold the recorded values; both failed before their fixes, with no file appearing. A capture still recording is refused, the private read is released with its use and never cached, and a file already read uses its cached log. Five planted mistakes each failed them. The scan-index and REV sync guards record cache_unaffected. ./gradlew build passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native reads report three facts with every sample about its record: its byte position in the log, its payload size, and its index among the entry's records in file order. Format 1 kept none of them, so native reads could never be answered from a column file. Format 2 keeps them per entry, in the layout the maintainer chose on 2026-10-21 from four measured choices. Byte positions are packed as zigzag varint differences in blocks of 4,096, each block's first value kept whole. Payload sizes are kept once in the directory when they agree, and packed per record when they vary, as struct arrays' do. Indexes are packed only where they are not the record's position in time order: an entry logged out of order, or one with a record that failed to decode. The writer keeps each decoded record's facts beside its time and moves them with the time sort. The reader checks a packed section once, its checksum over exactly its bytes first, then its block index and every value in order, and exposes the facts by record position. Format 1 files are refused by version and removed by the startup sweep. Nothing reads the facts yet. Measured on the three team logs, read-only: the facts add 5.6 to 7.6% to the files, where whole positions would add 21 to 22% and every fact whole 39 to 42%. On the 2 GiB log's file, packed positions read forward at 4.5 ns a record against 1.8 ns for whole values, and a window's first record takes 6.4 us from its block. Verified: ColumnFileTest works the facts out by hand for entries out of order, with a failed record and with varying sizes, and refuses crafted directories and crafted sections whose checksums are right. The new ColumnFactsDifferentialTest checks every held entry of every fixture, and a three-block log, against the independent reader's record positions, sizes and times, including reads in shuffled and backward order. Twelve planted mistakes each failed them. The column file guard records the format bump. ./gradlew build passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Numbers reached the tools two ways: a resolver decoded an entry into one object per sample for read_entry, render_chart, the data endpoint and the statistics tools, and a record cursor decoded records for native reads, the visualization preview and compare_sessions. Column files were built in the background, but nothing read them. Now every numeric reader works on one series: a path's samples as numbers by position, read from the log's column file once one is built and otherwise from the decode. Windows, angle unwrapping, buckets, data quality, summary statistics, interpolation, lags and exact pages run on the series whichever source it came from, so a read from a file makes no object per sample. read_entry, render_chart, the data endpoint, get_statistics, compare_entries, compare_matches, detect_anomalies, find_peaks, rate_of_change, time_correlate, align_entries, find_condition and the visualization's charts read this way; their list helpers are gone. A scalar entry keeps the decode's value types, and repeated values are told apart by the bits the decoded values' own equality uses. A native read of one numeric leaf comes from the file's columns and record facts through the shared record selection, so windows, orders, batches, byte budgets, record limits and reductions behave as before. The file serves it only when every record decoded and holds the leaf, the leaf is neither an enum nor a uint64 field (one record decoded the native way shows which), and a read by record index finds indexes that are positions. Everything else, and the local reader, which never opens the server's cache, reads the log. A loaded log opens its content's file on first use and closes it with its own mapping, after its last reader; the cache's trim keeps held files, and a damaged file is read no more, removed and rebuilt. The reader JAR now packages the numeric column record its log interface names; the full build's reader linkage check found it missing. Verified: the resolver gives every held and pooled path of every fixture and an edge log the decode's samples, value bits included, and the data endpoint's series keep the decode's types and decode problems; the five presentation routes answer their 39 cases from the file against the same oracle; the conformance sweep calls every tool on every fixture again with a column file and requires the same result; native reads match the log's batch by batch, record facts and problems included, in sixteen ways on an edge log and every fixture; tests pin which reads a file serves and that a held file closes with its log's mapping. 34 planted mistakes each fail a test; 13 first passed and now have tests of their own, several in shared tool code (a rate's last point, infinite samples in find_condition and detect_anomalies, an angle held as logged, compare_matches' extreme times, the default lag step). On three team logs, read-only and unchanged, twelve whole-log read_entry overviews took 10 to 33 ms from the files against 24 to 87 ms already decoded, and ten-second windows 1.5 to 3.3 ms against 11 to 52 ms. The three cache guards record why files, indexes and synchronizations already written give the same answers. Full build: 5,156 tests, none failing, 87 opt-in skips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan described the recording phase in one paragraph, with nothing measured, while the open capture's index kept an object on the heap for every record, about 52 bytes a value at the soak's rate, until its file closed: more than the default heap before a file reaches its 1 GiB rollover, and the reason the Grafana plan's stage 1 gate waits on this phase. The plan now gives the design: per-entry columns of each record's facts and a number's value, in packed blocks written to a scratch file in the disk cache that is never forced, the heap as the fallback, and numbers leaving the hot window, with a throwaway prototype's measurements on synthetic values at the soak's rate. The maintainer answered its four questions as proposed on 2026-10-22; the plan and DECISIONS.md record them. The read-path section also gets a rewrapped paragraph and says "held and pooled path" for what the resolver gives. Checked: the documentation claim checks pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before, the open capture's index kept an object on the heap for every record, pinned until the file closed: 62 bytes a value with the default ten-minute hot window, about 2 GB over two hours at 5,000 values a second, and the writer's thread paid more for each value as the heap grew. Each entry now keeps its records' publication sequence, time, byte position and payload size, and a number its value, in a tail of up to 512 records; a full tail becomes a packed block, written to the capture's scratch file in the disk cache, never forced, and read back with one positional read. Numbers are read from their columns and keep no hot values; a record that does not hold its type's value in its type's width is read from the WPILOG as before, and its entry's numeric reads then come from the decode. When the disk cache is off, the recording's reserve is short or a write fails, the blocks stay in the heap, packed, and list_sessions reports why in index_in_heap. The file counts toward the cache limit but is never evicted, is deleted once the writer has moved on and the last reader is done, and is swept at the next start. The design called for reading blocks through a mapping; a positional read needs no mapping retired under its readers, for 6.9 ms against 2.2 ms over twelve five-minute panels, and the maintainer kept that change on review. The plan and DECISIONS.md record it. Measured with one benchmark compiled against the parent commit and this one, 100 double topics at 50 Hz for 30 minutes: heap kept 62 bytes a value before, 0.3 now; the writer's thread 46 ns a value plus 83 ns of expiry before, 152 ns over the second 15 minutes, and 47 ns now, flat; 14 bytes a value on disk. Verified: the full build, 5,174 tests (an installer test lost its free port to another program between choosing and binding it, and passed on rerun); each sampled WPILOG prefix read independently agrees with every record and every offered column, in a file and in the heap, with the hot window on and off; counted tests of the heap, the blocks a window decodes and the off-type list's growth; 19 planted mistakes each fail the tests. A first plant run hung on one, which showed the off-type list copied whole for every record; it now doubles. The scan-index and sync-cache guards record why their indexes and results stay valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grafana's live panels need the capture recording now and a window in Grafana's own time. Before, a panel looked the open file up in the catalog and went on plotting an old file after a rollover, a window could be asked for only in the log's seconds, and every request rebuilt the UTC mapping from the whole clock entry, which on a recording meant reading it from its start. /data/entries takes capture=current, resolved from the transport's live capture at each request and admitted as any path, and refused with 404, the reason and the last session when nothing records. start_utc and end_utc choose the window by measured UTC, ends included; the mapping never runs backwards along the log's time, so a UTC window becomes one window of log microseconds found by search, and its rows are exactly those whose timestamp_utc lies in it. A log that cannot be placed is refused with 422. utc_basis gains clock and, for UTC windows, the count of samples before the first reading; the sampling class is scored over the window. The valid-reading rule moved into an accumulator that a fresh read and a recording's extension share. A loaded log keeps its mapping; a recording extends one set of readings per clock entry, reading new values outside its lock, and each view maps exactly its own prefix. The robot's clock places a log when it has a valid reading, else a recorded /Daemon/Clock/EpochTimeMicros, labeled pit_clock. Captures do not record that entry yet: GRAFANA_PLAN leaves it to the maintainer, with a second decision on struct fields read on a recording. Verified: the full build; hand-worked UTC windows, buckets and refusals; a differential on every fixture with a clock; capture=current across two recordings and a closed one; a recording's mapping against fresh reads through a clock set, stepped and ambiguous; the accumulator against the previous loop on random clocks; and, counted, a ten-second window on a two-hour recording that decodes at most 40 of its 1,400 blocks. Twenty-two planted mistakes each fail the tests. The three cache guards record why their caches stay valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A robot that publishes no wall clock over NetworkTables, any robot without AdvantageKit's EpochTimeMicros, could not be placed in UTC: the data endpoint refused every UTC window on its capture with "No wall-clock entry", so a live panel had nothing to show. Every capture now records the server's wall clock as /Daemon/Clock/EpochTimeMicros. A NetworkTables time synchronization, every three seconds, makes a reading pending; the next value written takes it at its own robot time, carried from the server's clock when the reply arrived, so a reading runs late by the reply's one-way delay. At a value's time a reading never widens the file's time range, and readings stay a second apart so the synchronizations' jitter never runs the clock backwards. The entry is not provider context: it is never forwarded to gateway clients, it is declared in a file at its first reading, and a reading that does not fit is left for the next file rather than rolling this one over. An upstream topic of the same name is not recorded. The data endpoint places such a capture by this entry, labeled pit_clock. Verified: the full build (5,196 tests); readings worked by hand from a clock that moves with the scheduler, including a synchronization handled after its reply arrived; files too small to hold a reading beside their last value; an upstream topic of the name; a close that fails partway; and a robot with no clock read by a UTC window on its recording and on its finished file. The replay audit checks every reading of every replayed capture, and about 30 tests that pinned a capture's exact contents now count the robot's records apart from it. Nine planted mistakes each fail the tests. The maintainer's answers are recorded, including the confirmed reversal that struct fields become columns as the writer records them, which is built next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rules by which a decoded struct record's numeric leaves become columns lived in the column file writer: paths as the field path grammar spells them, a column's kind from its first leaf, a drop when a leaf of another kind comes, and the limits that leave an entry incomplete. A recording's index is about to keep struct fields as columns too, and two copies of those rules could drift apart, so that a field read differently on a recording and on its finished file. The walk, the rule for struct arrays wider than columns take, and the order a pooled path reads its columns in now live in one class, which the column file's writer and reader use and the recording will share. The class shapes every file, so it joins the column file guard's inputs; the guard's decision records that format 2 and recipe 1 are unchanged. Verified: column files built from the 24 fixtures and five real logs, three team logs and two public ones, with the writer before and after the move are byte for byte the same, and the team logs' SHA-256 are unchanged; the column file tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While recording, a read of a struct field such as a pose's x decoded the whole entry on every call, so a live panel of a pose decoded every pose of the session on each refresh: 360,000 after two hours at 50 Hz. The maintainer chose, and confirmed in words, that the writer decompose each struct record into columns as finished column files hold them. The writer now decodes each struct record once, with the schemas a call reading that record decodes it with, walks it by the shared rules, and appends each leaf's record and value to its own column, in packed blocks beside the entry's. A field is read by search, and an entry's decode problems are counted as its records are written, so a call finds them without decoding. A call decodes with the schemas its own prefix records: when a schema the struct depends on is first recorded or replaced, the writer decodes the entry's records so far again into a new generation that only calls from that record on read, at most 4,096 records for one schema. The WPILOG still answers for an entry past that budget, a struct array record wider than 64 elements, a leaf whose kind changes, a pooled path once some leaf had no column, and an entry recorded out of time order. The writer's work on a pose record goes from 62 to 271 ns, and on four module states from 62 to 635 ns, against about 4.1 us to write the record. Verified: the full build (5,200 tests); a differential at sampled boundaries comparing every leaf and pooled path of fourteen struct entries with a decode of the same prefix, through the cases where the columns stop, start again or step aside, with views held across later records and schemas, and against the numbers written, a scan of a copy and the finished file's column file; and a counted test in which a ten-second UTC window of a pose's x on a two-hour recording decodes no pose from the WPILOG and 70 of 4,218 blocks. Twenty-five planted mistakes each fail the tests. The log data interface's description of numeric columns, which b774289 left above the UTC mapping method, is back on its method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live dashboard's gate allows a twelve-panel refresh 50 MB of allocation. Its first run measured 51 to 88 MB, about 4.5 MB a request, and a dashboard opened after two quiet hours of recording would have read every new clock reading as an object in each of its panels at once, about 50 MB apiece. CSV rows are now built in one buffer the response keeps, numbers appended as String.valueOf spells them and UTC formatted straight into it; a UTC cell with a four-digit year is sized without being formatted. Measured UTC is interpolated in long arithmetic, rounding half to even as the exact path rounds the whole epoch, and the exact path stays for any step that would overflow. A recording's column readers read each packed block into one buffer they keep. A recording's clock readings are extended from the column as numbers, a chunk at a time, by one request while the others wait, with their room reserved once before a long extension; the wall clock's rule takes a reading's numbers directly, and its form taking a decoded value calls it. A UTC window of 1,000 buckets on a recording takes 2.5 MB a request, the same at six minutes as at two hours, and the first request after two quiet hours under 10 MB, most of it the readings the recording keeps. Verified: the full build; 1,121 data responses across every fixture, byte for byte the same as the previous build's; the CSV rows pinned against hand-worked text, with empty cells for a bucket of no finite sample and for a time before the clock's first reading; the long UTC arithmetic against the exact path on random clocks, ties on half a microsecond and products past a long included; and a recording's mapping against a fresh read of every prefix. Six planted mistakes each fail the tests. The sync cache guard records why cached synchronizations stay valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Grafana plan's first stage puts live panels of the open capture on the pit wall once a gate shows that a recording holding two hours at the soak's rate serves a dashboard within the maintainer's bounds: the listener waits at most a second, each refresh finishes within 250 ms and allocates under 50 MB, at two hours as at two minutes, and the heap grows less than 64 MB. The gate is the soak test's third method. The pit server's own capture service records a synthetic robot over loopback NT4, the soak's 100 topics at 50 Hz and an AdvantageKit-style wall clock: two hours streamed at ten times real time, then ten minutes in real time while twelve panels ask the real HTTP transport every five seconds for capture=current over the last five minutes by measured UTC at 1,000 points, each answer checked against the generator. On the maintainer's computer the refreshes at two hours took 18 ms at the median and 101 ms at worst, allocated 36 MB at the median and 44 MB at worst, the listener waited at most 37 ms, and the heap grew 9.8 MB. With the recording's column reads turned off, as before the recording phase, the refreshes allocate about 870 MB each at two hours and the gate fails. Streamed as fast as the recorder took values, about thirty times the soak's rate, the listener stalled for seconds and once lost the robot, so the prefill is paced. The Compose example's Grafana installs Infinity 4.1.1, pinned, before it starts, provisions a data source whose base URL is the server, and provisions Pit / Pit recording beside the sampled dashboard: the same five robot panels, each a band from minimum to maximum with the mean over the open capture. Infinity shows a refused panel's status code but not the server's reason, so the dashboard's first panel says what 404, 422 and 400 mean. The docs test checks the dashboard against the route, and CI's metrics check confirms the plugin's version, the provisioning, and that a panel's own query, sent through Grafana with nothing recording, comes back refused. Verified: the full build (5,204 tests) and the Python checks; the gate at two hours, passed, and with column reads turned off, failed. The Compose stack itself has not run: Docker is not installed here, and CI runs it on a pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since f853dcc every capture records its server's clock as /Daemon/Clock/EpochTimeMicros, so the real-server check of a recording's entries listed 301 names and failed against the 300 it pinned. Only followBrokerTest runs that check, and CI selects it for pull requests, so the failure went unnoticed when the clock was committed. The expectation now names the clock beside the robot's entries. Verified: followBrokerTest failed at fc498f3 and passed at f853dcc's parent, b774289; with this change it passes 5 of 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer asked whether recordings should be written as column files instead of WPILOGs: people analyze the robot's own log once it is pulled, and a recording's value is live data and data not yet off the robot, so a WPILOG could be written on demand. RECORDING_FORMAT_PLAN.md sketches that format, the five ways capture files depend on being WPILOG today, the questions it would raise and how it would be tested, and IDEAS.md lists it. The maintainer set it aside the same day: recordings stay WPILOG, and the writer buffers its writes instead, which removes the system calls that stalled the recorder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The capture writer wrote each record as it came, with two writes and three requests for the file's position for every value, about 4 µs. At ten times the soak's rate the listener waited in the kernel for over a second four times in twelve minutes, and at thirty times it lost the robot. A capture's output now keeps its records in a 256 KiB buffer and writes them at once: at each 250 ms flush tick, before the force, when the buffer fills, and at close and rollover. A value costs about 20 ns. A process crash now loses at most the last tick's records, which the maintainer accepted. A value can now be recorded before its bytes are in the file, so the index keeps a value hot until its record is in the file, and the size the store publishes for the open capture counts only the bytes in the file. A write of the buffer that fails truncates the file to its last complete write and ends the session as a failed write, with no finish record that could name an entry whose start was lost, and the recording's index is let go so later reads load the file. Close forces what the file holds even when its last write fails. The store decides each entry's metadata role once, not for every value, and the dashboard gate reports the listener's delays during its prefill. The tests' capture record helper reads to the end of a file, since WPILib's for-each loop skips a short last record. Verified: an output that writes each record as it comes is the reference for bytes and offsets; a slow force held open, failures at a tick and at close, and the server's recorder over a real NT4 connection are checked, and 20 planted mistakes each fail a test. The full build passed 5,217 tests. The two-hour gate failed one refresh at two minutes, 260 ms against 250 ms on a loaded machine, and passed every bound on a second run; no prefill listener delay reached a second (longest 112 and 7 ms). The shop harness with native replay, the Java real-log replays on the team-log sample, npm test and followBrokerTest pass. The cache guards record why the log manager and live log changes leave cached indexes and synchronizations valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A robot that reconnected under the same boot had the recorder reopen the file it closed at the disconnect and append to it. The store hashes a capture file when it closes, and a store with a format-2 replica catalog publishes that hash, so after the append every read of the file was refused for a hash mismatch, the live dashboard's included, and the file's publication stayed pending as an authority conflict through every recovery pass. A closed capture file is now never written again. A continuing clock continues the session in its next file, as a rollover does, with a fresh writer identity, its own live index and its own clock record, and the store no longer rewrites the manifest when a reconnect is admitted. The next file starts with what the robot sends on reconnecting, its topics' last values at their original times, so two files of one session can hold the same value. A new format-2 recovery test, a reconnect after a published close, fails on the previous build at the reconnect's file and passes now. Nine tests that pinned the append now pin the next file, and four planted mistakes each fail a test. The full build of this commit's tree passes in a clean copy (5,218 tests, none failing). With this change and the next, the shop harness passed 37 of 37 on the team-log sample, the logs unchanged; followBrokerTest and the extension's npm tests passed with all three. The decision index gains this decision's row and the 2026-10-22 row for buffered WPILOG recordings, which 81c0293 built without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A format-2 mirror copied every finalized file a peer offered, the pit's
closed captures included. That broke the rule of 2026-10-17 that a
mirror copies what the pit pulled or was given and never a capture,
since a laptop records live data from the pit's gateway itself; the
rule had been read as superseded by the growing-recordings answer of
2026-10-18. The maintainer restored it on 2026-10-23 ("Skip captures").
The reconciler now passes over an offer whose completion basis is a
closed capture, finished or still recording, and still copies each
capture's clock record. The pit still publishes its captures in its own
catalog.
A new test has a format-2 mirror copy an import and a capture's clock
record byte for byte and never the capture; a planted mistake that
copies captures again fails it. The clock-record test now expects two
copies and no log, and the peer test of a growing offer offers an
import, since a capture is passed over before that check. The full
build of this commit's tree passes in a clean copy (5,219 tests, none
failing). The plans and the decision index record the rule as standing
again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before, a /data/entries request read one file, by its path or as the open capture, so a dashboard over a robot's history needed a query for every file, and nothing chose between a roboRIO log and the pit's recording of the same minutes. /data/entries now takes robot, start_utc and end_utc in place of path. The store's catalog nominates the robot's WPILOGs within two hours of the range, each file is placed by its own clock, and a stretch reads the roboRIO's log where one exists and the pit's recording otherwise: names gives each entry as the roboRIO's logs name it, capture_names as the recordings do, and source=capture reads the recordings alone. Two roboRIO logs, or recordings of two sessions, over the same minutes are refused together, the files of one recording are read in order, and at most 64 files answer. The response lists the files, the stretches, the files skipped and why, and the manifests the catalog could not read. /data/robots and /data/sessions list a store's robots and a robot's sessions in CSV, from the catalog alone. The Compose example gains Pit / Robot history: a robot, a source, a sessions table whose rows set the range, and five panels with a box for each source's name. A range refuses a REV signal for now. This is the design of GRAFANA_PLAN.md's stage 2, answered as proposed on 2026-10-23. Eleven range tests over fixture files whose clocks they set check every row against answers worked from the fixture alone, and buckets against the bucket rule worked apart from the server; eleven of twelve planted mistakes fail them, and the twelfth cannot change an answer. A structural test pins the dashboard, and three planted mistakes fail it. CI's metrics check sends a history panel's own query through Grafana to a server without a store, which refuses it. The full build of this tree passes in a clean copy (5,231 tests, none failing), and so do the CI script's tests, followBrokerTest and the extension's npm tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e window Before, capture=current read the open file alone. Since 7a49563 a same-boot reconnect continues the session in its next file, so after a radio blip, as after a rollover, a live panel lost everything before the new file until its window moved past it. capture=current now reads the closed files of the session recording now that the window reaches, as well as the open one, as the store's manifest of the session lists them; a peer's capture of the same boot, filed under the session's peer folder, is not one of them. The files share the robot's clock, so they merge in its order and a window in seconds holds the same times in each. In UTC a time is placed by the clock of the file that was recording then, each closed file's up to its last record, so a value the reconnect's file repeats at its original time keeps the time the closed file gave it. Catalog times only nominate a closed file, within two hours of a UTC window; at most 64 files answer; an angle unwraps once across the files; and a UTC window is refused only when no file of the session can be placed. With no closed file in the manifest the response is as before; otherwise it adds inputs.files and inputs.skipped. The closed files load without starting REV synchronization, through a new access method that keeps the caller's ownership of the log. This reverses the 2026-10-21 answer that a live window reads only the open file, in the maintainer's words "(2) Yes" on 2026-10-23. Fourteen tests over files whose clocks they set check every row against answers worked from the fixture alone; sixteen planted mistakes each fail them. The live dashboard's gate passes on a quiet machine (two-hour refreshes: median 18.8 ms, p95 29.2 ms, slowest 185.7 ms; 44.9 MB at most; listener 17.9 ms). The full build of this commit's tree passes in a clean copy (5,245 tests, none failing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before, a robot range refused a REV signal, which was read only by its log's path, and a range's first read of each log started the background REV synchronization a tool's read starts, decoding every signal of each REV log recorded with it for a request that named none. A name that starts with REV/, the same in names and capture_names, is now read from the robot's REV logs the catalog nominates. Each is placed through the alignment the store recorded with a WPILOG of its session that the range placed, the roboRIO's log before the pit's recording, as the maintainer confirmed on 2026-10-23, and decoded for the signals asked for alone. A REV log without a recorded alignment, or without the signals, is listed as skipped: nothing is correlated during a request, and a range loads its logs without starting REV synchronization. Two REV logs that answer one signal over the same minutes are refused together, while two buses' logs that answer different signals both answer. The REV read cache counts the signals it decodes, so a test can see a selection hold. Eight tests on a session whose recording's clock reads half a second later than its roboRIO log's, so the two anchors give different answers, check every row against answers worked from the fixture alone; ten planted mistakes each fail them. The full build of this tree passes in a clean copy (5,253 tests, none failing), and so do the CI script's tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…current does
Before, a range placed every file by its own clock, so the value a
reconnect's file repeats at its original time got a second time, a
synchronization from the first, and the history dashboard put it where
the live dashboard did not. And a range spared the files of one session
the overlap refusal, though peer sync can file two recordings in one
session: a peer's recording of the same boot was merged in, not refused.
The files of one recording are now placed as capture=current places a
session's: they share the robot's clock, and a time is placed by the
clock of the file that was recording then, each file's up to its last
record. A recording is one capture start on its first collecting store,
the identity the store's session reads already use, for grouping files
and for the overlap exemption alike; files of two recordings in one
session are each placed by their own clock and refused when their
minutes overlap. The maintainer chose the rule on 2026-10-23 ("Yes to
all").
Three tests with clocks that tell the rules apart, each row worked out
from the fixture alone; five planted mistakes each fail them, the
previous rule and the previous exemption among them. The shared
admission check now counts the range's acquisition for a recording. The
full build passes in a clean copy (5,256 tests, none failing), and so
do followBrokerTest and the extension's npm tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… clocks Before, CI's metrics check ran the documented Compose stack against a server with no store, so it saw only the history panels' refusal and never a row; stage 2 left the check on a store with known clocks to be built, since it needs Docker. The check now has a second phase. The server restarts on a store the check writes itself, a roboRIO log and a pit recording of the same minutes, with clocks the check sets, in WPILOG written from the format's specification alone. Through Grafana and Infinity the check then reads the history dashboard's robot choice, its sessions table, and a battery panel's own query at its 1,000 points and at four, and checks every row against rows it works out from the store by the stretch and bucket rules. A frame's fields are read by their columns' display text, as Infinity names them. On a Fedora workstation with Docker the whole check passes; a server that keeps a recording's samples inside a roboRIO log's span, one that places every sample a millisecond late, and a dashboard whose panel swaps its two entry boxes each fail it. Unit tests cover the fixture writer, the expected rows and buckets, and the answer checks without Docker, with Grafana's answer keyed by the query's own id as Grafana keys it. The development guide gains a section on the check. The full build passes in a clean copy (5,256 tests, none failing), and so do the CI script's tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ELinux
On a host with SELinux enforcing, such as Fedora or RHEL, a container
cannot read a file bind-mounted from a home folder, whose label is
user_home_t. Prometheus could not read its configuration ("permission
denied") and stopped, Grafana could not read its provisioning, and CI's
metrics check failed at its first container step on a Fedora
workstation. CI runs Ubuntu, without SELinux, so it never saw this.
Each of the example's five file mounts now carries z, so Docker
relabels the file for containers; where SELinux is off, Docker does
nothing for z. A structural test requires z and ro on every file mount
and fails on a mount without z. On the Fedora workstation, with the
files back on their home-folder label, the whole metrics check passes
and Docker relabels them. The pit server guide says why the mounts carry
z.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upload test imported a file that the store releases from the log
manager before moving it, without granting its temporary folder, so it
passed only while the log manager's grant list was empty, which admits
every path. The fixture helper grants its shared folder for the life of
the JVM, so the import was refused ("outside configured log
directories") whenever a test that uses that folder ran before it in
the same fork: adding a test class to the store package moved it behind
one, and two full builds of three failed on it. The tests now grant
their folder and restore the grant list afterwards, as the capture
writer test does since 0f724bc.
Verified: run in one JVM with a class orderer, the index memory test
followed by this class failed before the change (access denied) and
passes after it; the whole store package passes after the index memory
test in one JVM. The full
build passes in a clean copy (5,257 tests, none failing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tore again
A catalog read takes no lock, so the store can rename a folder while a
read walks it, as it renames a session's folder once the session's
match is known. The read then failed on the folder it had listed, so
list_available_logs refused the whole store ("No configured log
directory could be read"), which the shop harness hit in one run of
three on a Linux workstation; or, when the rename fell between its
check and its look inside, it passed the folder by and left the session
out of its answer, with no error.
A read that finds a folder it listed gone, a session vanished while its
own manifest is read, or a session it read moved before it finished now
starts over at once, since a rename is one atomic step. On its third
attempt it names a folder still moving: a strict read fails with it,
and a tolerant one lists it with the other problems and keeps every
other session.
Five tests rename a session folder at chosen points inside the read,
through the read's own hooks; each fails on the previous code, and six
planted mistakes each fail them. With the fix the shop harness passed
four runs of four on the Linux workstation, its roboRIO container and
real PhotonVision included. The full
build passes in a clean copy twice (5,262 tests, none failing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Clients grant temporary permissions through loopback-only HTTP registration,
never tools. Session removal and registration share the per-session map lock,
so DELETE, expiry and transport shutdown revoke permissions without a late
registration restoring them. Cached reads are revalidated too. Listings,
store discovery, imports and inboxes see the dynamic directory set.
connect now loads shared-server settings only from home or --config and passes
that exact file to the spawned daemon. Project YAML contributes only top-level
logdir/team, combined with bridge flags and resolved against its cwd. Repeated
initialization registers again; EOF deletes the session. The daemon records an
ignored project servers section without receiving project secrets.
log_directories now carries path/origin/team objects; log_directory_paths
retains plain strings. Updated the extension's pure readers in this commit so
both server versions remain usable. Per-path teams were agreed with the
maintainer. Most-specific directories win, with newest leases breaking ties;
the newest live key wins, and a null key clears only that session's override.
Verified on macOS: ./gradlew build, 2310 tests, 71 opt-in skips, zero failures
or errors; npm test, 298 passed, zero skipped/failed. Real HTTP tests exercise
admission, cached-read revocation, independent leases, team precedence,
Origin/bind refusals, malformed input, canonical paths, imports and the inbox.
A real packaged bridge/daemon uses scratch home/project directories and a
conflicting project port; URL sessions, flags, project teams, reinitialization
and cleanup are checked. A fake TBA API records the actual key header and the
test captures real server logs and result bodies to check confidentiality.
Observed 32 production plants and two TypeScript plants fail runtime checks:
omitted admission; cached/unrestricted reads after revocation; missing session
cleanup, early deletion or replacement; wrong origins/per-path/cached/logged
teams, specificity and cross-session removal; unresolved/outside symlinks;
removed loopback/Origin/session gates; accepted files/fractional teams; wrong
key precedence/clearing, leaked keys and unsafe header values; disabled inbox
polling; project-selected startup, missing explicit child config, dropped bridge
registration/flags/project team, retained bridge sessions; missing removal
callback; and broken rich-directory decoding/plain-path compatibility.
All plants were restored. Initial full-suite failures in REV discovery and
metadata identity were corrected before the final build.
Not verified: native Windows, real VS Code, live TBA, and opt-in real-log/stress
suites. Tests use synthetic logs/keys, scratch installs, and local fake services.