Skip to content

docs(lab): HEADARC3 — logged-children ordering law (multi-day) + regression lock - #380

Merged
mikegreiling merged 1 commit into
mainfrom
mg/headarc3-logged-ordering
Aug 3, 2026
Merged

docs(lab): HEADARC3 — logged-children ordering law (multi-day) + regression lock#380
mikegreiling merged 1 commit into
mainfrom
mg/headarc3-logged-ordering

Conversation

@mikegreiling

@mikegreiling mikegreiling commented Aug 3, 2026

Copy link
Copy Markdown
Owner

HEADARC3 — the logged-children ordering law, multi-day discrimination

HEADARC2's captures were all same-day, so its "most-recently-completed first" could not distinguish stopDate DESC from date DESC then index ASC from index ASC. This probe builds a multi-day fixture with a same-day tiebreak pair that separates all three.

Fixture (lab/scripts/research-headarc3.sh, golden things-lab-golden-v1 · Things 3.22.11 · guest clock advanced 2026-07-05 → 2026-07-09): project HA3-Foo-P, heading Foo, children A,B,C,D,E created in index order, completed B (day1), C (day2), A (day3), then D then E same day (day4). So index order A<B<C<D<E ≠ stopDate order B<C<A<D<E, and the same-day D/E pair (completed in index order) renders E,D under a stopDate-DESC law but D,E under an index law.

Verdict — all three contexts render E, D, A, C, B:

context shape sort
flat project logged toggle (heading OPEN) continuous list, per-row date + muted heading sublabel, no day sections stopDate DESC, within-day by completion instant
archived-heading group (Foo archived) Foo grouped section header + nested children, no per-child sublabel stopDate DESC, within-day by completion instant
global Logbook day-grouped (Yesterday / month headers), per-row date + project sublabel most-recent day first, within-day stopDate DESC

The same-day pair renders E before D (E's stopDate is 5.8 s later) → the within-day tiebreak is the completion instant, NOT child index. The maintainer's literal B,C,A-over-three-days answer is A, C, B. HEADARC2-B's in-project-toggle-labels-HEADING vs Logbook-labels-PROJECT asymmetry re-confirmed.

Shipped rendering CONFIRMED — no divergence. src/read/project-view.ts already sorts both the flat logged region and the archived-heading group children by stopDate DESC (full-timestamp, so same-day ties resolve by instant, matching the GUI), and the flat continuous shape matches our flat logged[] / loggedHeadings[].items — no shape change. The contract's stopDate DESC "Read views" claim is confirmed (accrues in the assumption register per the version-stamping doctrine, not a contract edit).

Changes

  • docs/lab/headarc3-logged-ordering.md — campaign doc (byte evidence, HEADARC3-1/2/3 verdicts).
  • lab/scripts/research-headarc3.sh — build driver (multi-day fixture + byte snapshots; GUI phase via guest screencapture + one vncdotool toggle click).
  • test/cli/render.test.ts — two HEADARC3 regressions locking the law (index≠stopDate fixture asserts E,D,A,C,B for both the flat region and the archived-heading group).
  • docs/reference/assumption-register.mdRD-7 (logged-region ordering = stopDate DESC), Confirmed under 3.22.11.
  • docs/reference/README.md — probe-id index row.

No behavior/contract change; no CHANGELOG (not user-visible). VM headarc3-lab torn down (only the golden remains).

…ession lock

Multi-day probe that resolves the HEADARC2 same-day ambiguity in the logged
region's sort. Fixture: heading Foo + children A,B,C,D,E in index order,
completed B,C,A across three days then D,E same-day (index order) — so index
order (A,B,C,D,E) differs from stopDate order (B,C,A,D,E) and the same-day pair
separates stopDate-DESC from date-then-index from index-ASC.

Verdict (all three contexts render E,D,A,C,B): the flat project logged toggle
(heading open), the archived-heading group, and the global Logbook all order
swept children by stopDate DESC — most-recently-completed first — with the
within-day tiebreak the completion INSTANT, not child index (D-then-E -> E,D).
Only the shape differs: the global Logbook adds day-section headers
(Yesterday/month), the in-project toggle/group is a continuous per-row-dated
list. In-project toggle labels the HEADING, Logbook labels the PROJECT
(HEADARC2-B re-confirmed). Maintainer's literal B,C,A-over-3-days answer = A,C,B.

Shipped rendering (project-view.ts logged / loggedHeadings stopDate DESC)
CONFIRMED — no divergence. Law newly locked by two render.test.ts HEADARC3
regressions (index != stopDate fixture asserting E,D,A,C,B). Assumption
register RD-7 + reference index row, Confirmed under 3.22.11. Probes-only +
test-lock; no behavior/contract change.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYbJensXxHpJK1v1VDXYUD
@mikegreiling
mikegreiling merged commit 39855da into main Aug 3, 2026
1 check passed
@mikegreiling
mikegreiling deleted the mg/headarc3-logged-ordering branch August 3, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant