Repository navigation
feat(t27os): G3+G4 live mycelium — PTY tap fold, k-hop reading, batch fold, k-hop cache (Closes #12779) - #13031
Merged
Merged
Conversation
…atch fold (Closes #12779) G3 (petal C): specs/t27os/pty_live_graph.t27 — PTY pane events from ~/.t27os/pty/ folded into work graph via pty_state_to_kind, pty_parse_line, pty_fold_batch (single pass, batched apply_event). pty_fold kept as thin wrapper for backward compatibility. G4: specs/t27os/graph_k_hop.t27 — k-hop traversal from seed pid over folded work graph via graph_fold_batch (single pass, batched apply_event), k_hop_read BFS with trace dump. graph_fold_ring kept as thin wrapper. Both: batch fold optimization #1 — one parse pass, apply_event per pair. Tests: G3 6/6, G4 5/5. Seals saved. No cron, no seal drift, no new epics, no fixture/demo data. phi^2 + phi^-2 = 3 | TRINITY
… graph_digest (Closes #12779) Adds k_hop_read_cached over k_hop_read: - key: (seed_pid, k_hops, graph_digest(g)) - cache hit: skip BFS, copy stored output - cache miss: recompute, store result + digest Tests: 8/8 (incl. cache hit returns same total, cache invalidates on digest change). Batch fold (#1) untouched. No cron, no seal drift, no new epics, no fixture/demo. phi^2 + phi^-2 = 3 | TRINITY
…2988) The landing gate (t27b test --check, specs/tri/land/land.t27 step 13, #11225) refused: t27c's optimizer hoists e - i, a subexpression over the stable locals e and i, as a _cse temp above their declarations. The span and its newline are computed once into consumed before any use; the trailing-space skip after the state parse is dropped (its s was never read again). A comment line returns the same count; at end of text the outer loop terminates either way. Before: t27b exit 2, unsupported construct FnDecl(reference CSE hoist). After: t27b exit 0, 6/6; t27c test-report 6/6.
…hable (Refs #12988) Three defects the landing gate (t27b test --check, #11225) and its own tests had failed to catch, found while landing: 1. The miss path snapshotted the whole caller buffer; k_hop_read writes only its lines, so the copy read bytes never written (interpreter fault; the JIT tolerated it). Every byte of the buffer is now defined first. 2. kcache_valid was never set: the cache never hit, and the on-hit test passed with two recomputations. The flag is set on a miss, a hit counter (kcache_hits) makes the claim countable, and the two tests now assert the hit and the invalidation by delta. 3. A hit copied kcache_out_len bytes regardless of the caller's buffer; the copy is now bounded by the smaller of the two. Before: t27b exit 4, 2 JIT/interpreter mismatches. After: t27b exit 0, 8/8; t27c test-report 8/8.
… fold, k-hop cache (Closes #12779) Merge of master and the seals, by the tri land step sequence (specs/tri/land/land.t27), run by hand: the stage step of a443044 puts two commands in one argv and cannot execute. The gates ran on the merged tree: tests 6/6 and 8/8, t27b --check clean on both specs, seals MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's. Refs #12988.
Contributor
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.
Closes #12779.
The lane's G3+G4 work as one batch: PTY panes folded into the work graph (pty_live_graph.t27: pty_state_to_kind, pty_parse_line, pty_fold_batch), the k-hop reading of the folded graph (graph_k_hop.t27: graph_fold_batch, k_hop_read, k_hop_read_cached keyed by (seed_pid, k_hops) and invalidated by graph_digest), the batch-fold optimization, and the two fixes the landing gates demanded (the t27b CSE-hoist in pty_parse_line; the undefined-read and never-hitting cache in graph_k_hop).
Gates on the merged tree (tri land --check, every gate passed): tests 6/6 and 8/8, 0 vacuous; t27b test --check clean on both specs (0 JIT/interpreter mismatches); seals MATCH; tri types ratchet CLEAN; dupe_scan failure set a subset of master's.
Refs #12988 — the T27F Live Actors Map loop; this is its gap "land the Queen band tap ring from lane/queen-band-graph".
Landed by hand because tri land's stage step cannot execute: a443044 puts two commands in one argv ( census pin --bless git add .trinity/seals -> clap exit 2), and the built binaries carry an older variant that fails with git exit 129. The step sequence above is tri land's own; the tool defect is filed separately.