Repository navigation
Commit b88da5e
authored
* 🚧 Give navigation its own snapshot, and measure the rail — layers 1 and 3a
**Layer 1.** `ReplHistoryNavigation` is the one reading taken at the whole
file rather than at the selected prefix: a marker and a kind per retained
position, and the head. No label, no source, no name, no value, no outcome
detail — a reader standing at an earlier position learns *that* later
positions exist and what kind they are, and nothing about what they hold.
Both halves now come from one acknowledged array. `reproject` snapshots it,
projects the whole file for the summary and the requested prefix for every
other pane, and drops the full model rather than keeping it, so nothing
downstream can reach a later entry through it. A later malformed segment
refuses the whole reading, including for an earlier marker.
The head is derived on read, not cached: pausing, resuming and the last of an
entry's resources releasing all change it while the file stands still. Its
liveness fact is PR 2's entry-wide signal, which stays true until the outer
Agent attachment and the consumers have gone — a body that returned and a root
Close that was recorded are both earlier than that.
**Layer 3a.** `history-rail.ts` prepares the five rows from engine
measurements. The right-hand caption column is reserved once for *every* head
label, so a head change re-cuts nothing; the rail is what remains; marks are
placed at `round(i × (W−1)/(K−1))` and a lone position goes where the head is.
Collisions become one visual group that keeps every member, and each category
colours itself from its own members — a group holding a passed entry and an
unreached minor position is both, and one colour would lose half of it.
Two defects the tests found. The caption merge loop read its bound from the
list it was shrinking, so it stopped before the last pair joined. And the
band's minimum is its title plus the reserved head column — 49 columns — which
three of my own cases were below; they were asking for a refusal and reading
it as a bug.
`repl-history.test.ts`: 16 steps, every width from a real engine.
* 🚧 Draw the band as a measured rail, and give the drawer the whole order
The band was a list of checkpoint labels wrapped across five rows. It is now
the rail the handoff froze: a title and the head on row 1, entry captions and
the selection caption on row 2, tall uprisers on 3, the rule on 4, minor stems
and the head's marker on 5. Marks are placed from engine measurements, the
right-hand caption column is reserved once for every head label, and layout
receives inert text and roles — no Journal, no session, no capability.
The History drawer now reads navigation rather than the selected prefix, and
says what each position *is* — `12 · Agent turn recorded` — counted from the
thin list rather than looked up, because looking it up would mean reading a
payload the summary deliberately does not carry.
One real defect, caught by the too-small profile: the band was being prepared
for a frame that publishes no footer, turning a refusal the product already
handles into a measurement failure.
The replaced premises, itemized. Nine assertions across five suites, each with
the claim it still makes:
- `repl-terminal`'s label-grouping case is **retired**, not re-anchored: it
asserted that a compact band shares labels and that each marker names the
others sharing one, and the band has no labels. Its surviving claim — a
compact band never costs a reader an exact position — is now
`repl-history`'s "keeps every member", made against the real engine at two
widths and checking ordinals as well as markers. It is not re-anchored in
place because that suite drives a fixture surface that carries an empty
band, so the case would have asserted grouping that nothing grouped.
- `UI5` keeps placement and full-width rows and drops reading a label out of
the band; `G1` asserted one accent for the whole band and now asserts that
every cell is one of the band's own roles.
- `UI15` had two premises this slice reverses: a drawer row holds no `·`
(they all carry their ordinal now) and a frozen prefix lists fewer
positions than the head (it lists the whole order — that *is* the
navigation exception).
- `repl-agent-journey`'s J3 asserted that an earlier prefix offers no later
marker. It does now; what it must not do is show what that marker holds,
and the pair is asserted together.
- `focusedOn` steps past a row's ordinal, as it already stepped past the
focus and selection cues.
Frozen commands: 93 tests / 301 steps and 19 / 111, both exit 0; whitespace
gate on the endpoint diff exits 0.
* 🚧 Prove the head against a real session — layer 2's evidence
H3 drives `openReplSession` rather than calling the derivation: empty before
an entry exists, live from before its first record, settled once its outcome
is retained and nothing of it is still standing.
The case that matters is SETTLING. An installation of the entry's own reads
the head at the moment it is released — after the root closed and before the
entry's work had finished — and finds `settling`. A head taken from the root
Close alone would have called that finished, which is the defect the frozen
precedence exists to prevent.
And the summary carries no payload: a `<Json>` holding `shibboleth` leaves
nothing of it in the navigation, whose points have exactly `marker` and
`kind`.
* 📝 Say what the band shows and what the head means
`specs/repl-spec.md` gains the five rows, the measured reservation, the
proportional placement, grouping that keeps every position selectable, and the
seven head readings with their precedence. `architecture.md` gains the two new
modules and the navigation exception: one acknowledged array per wake, two
projections of it, the full model discarded from child reachability, and a
head that changes while the file stands still so it rides the existing wake.
Both in present tense, and both say the thing that is easy to lose: the band
is the one reading not taken at the selected prefix, and that exception is for
the band and not for capabilities.
* ✅ Prove navigation is the whole order while content is one prefix (#881)
* ✅ Reach every recorded position, and open an early prefix cold (#881)
* ✨ Read navigation and content from one snapshot, and prove the rest (#881)
* 🚨 Sort through a copy, so the Node typecheck accepts the History proofs (#881)
`tsconfig.node.json` pins `lib` to ES2022 and `toSorted` is ES2023, so the
three `toSorted` calls in the History suite failed `tsc` in every `test-node`
shard before a single test ran — ten identical shard failures, and the `green`
gate with them. `deno check`, `deno task test` and `pnpm lint` all passed,
and oxlint's `no-array-sort` actively recommends `toSorted`, so nothing local
said otherwise.
Sort a copy instead, which keeps what `toSorted` was chosen for: `ordinals`
arrives `readonly`, and nothing observes the order of the array sorted here.
`Object.keys` already returns a fresh array, so that one sorts in place.
The three remaining `no-array-sort` warnings are the lib's cost, and the
comment at the first site says so.
1 parent 9fe494d commit b88da5e
20 files changed
Lines changed: 3048 additions & 236 deletions
File tree
- packages/cli
- src/repl
- tests
- fixtures/repl
- issue-881
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5745 | 5745 | | |
5746 | 5746 | | |
5747 | 5747 | | |
| 5748 | + | |
| 5749 | + | |
5748 | 5750 | | |
5749 | 5751 | | |
5750 | 5752 | | |
| |||
5756 | 5758 | | |
5757 | 5759 | | |
5758 | 5760 | | |
| 5761 | + | |
| 5762 | + | |
| 5763 | + | |
| 5764 | + | |
| 5765 | + | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
| 5770 | + | |
| 5771 | + | |
| 5772 | + | |
| 5773 | + | |
| 5774 | + | |
| 5775 | + | |
| 5776 | + | |
| 5777 | + | |
| 5778 | + | |
| 5779 | + | |
| 5780 | + | |
| 5781 | + | |
| 5782 | + | |
| 5783 | + | |
| 5784 | + | |
| 5785 | + | |
| 5786 | + | |
| 5787 | + | |
| 5788 | + | |
| 5789 | + | |
| 5790 | + | |
| 5791 | + | |
| 5792 | + | |
| 5793 | + | |
| 5794 | + | |
| 5795 | + | |
| 5796 | + | |
| 5797 | + | |
| 5798 | + | |
| 5799 | + | |
| 5800 | + | |
5759 | 5801 | | |
5760 | 5802 | | |
5761 | 5803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
535 | 547 | | |
536 | 548 | | |
537 | 549 | | |
| |||
758 | 770 | | |
759 | 771 | | |
760 | 772 | | |
| 773 | + | |
761 | 774 | | |
762 | 775 | | |
763 | 776 | | |
| |||
790 | 803 | | |
791 | 804 | | |
792 | 805 | | |
| 806 | + | |
793 | 807 | | |
794 | 808 | | |
795 | 809 | | |
| |||
812 | 826 | | |
813 | 827 | | |
814 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
815 | 832 | | |
816 | 833 | | |
817 | 834 | | |
| |||
2790 | 2807 | | |
2791 | 2808 | | |
2792 | 2809 | | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
2793 | 2824 | | |
2794 | 2825 | | |
2795 | 2826 | | |
| |||
3383 | 3414 | | |
3384 | 3415 | | |
3385 | 3416 | | |
3386 | | - | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
3387 | 3424 | | |
3388 | 3425 | | |
3389 | | - | |
3390 | | - | |
3391 | | - | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
3392 | 3429 | | |
3393 | | - | |
| 3430 | + | |
3394 | 3431 | | |
3395 | 3432 | | |
3396 | 3433 | | |
| |||
4126 | 4163 | | |
4127 | 4164 | | |
4128 | 4165 | | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
4129 | 4174 | | |
4130 | 4175 | | |
4131 | 4176 | | |
| |||
4451 | 4496 | | |
4452 | 4497 | | |
4453 | 4498 | | |
4454 | | - | |
4455 | | - | |
4456 | | - | |
4457 | | - | |
4458 | | - | |
4459 | | - | |
4460 | | - | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
4461 | 4503 | | |
4462 | 4504 | | |
4463 | 4505 | | |
| |||
4487 | 4529 | | |
4488 | 4530 | | |
4489 | 4531 | | |
4490 | | - | |
| 4532 | + | |
4491 | 4533 | | |
4492 | 4534 | | |
4493 | 4535 | | |
| |||
4790 | 4832 | | |
4791 | 4833 | | |
4792 | 4834 | | |
4793 | | - | |
| 4835 | + | |
4794 | 4836 | | |
4795 | 4837 | | |
4796 | 4838 | | |
4797 | 4839 | | |
4798 | | - | |
| 4840 | + | |
| 4841 | + | |
4799 | 4842 | | |
4800 | 4843 | | |
| 4844 | + | |
4801 | 4845 | | |
4802 | 4846 | | |
4803 | 4847 | | |
| |||
4822 | 4866 | | |
4823 | 4867 | | |
4824 | 4868 | | |
4825 | | - | |
| 4869 | + | |
4826 | 4870 | | |
4827 | 4871 | | |
4828 | 4872 | | |
| |||
0 commit comments