Skip to content

K1 — pure named-stream schedule derivation with raw-label timebase support - #369

Merged
luisleo526 merged 3 commits into
mainfrom
ns-k1-land
Oct 11, 2026
Merged

luisleo526 merged 3 commits into
mainfrom
ns-k1-land

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

K1 — pure named-stream schedule derivation with raw-label timebase support

Branch: ns-k1-land · Head: 62cc8e495afd6d8c3696c68581e72adab3444075 · Base: 8d614339b9ce92c5a1b6662a29deca5deec0ed71 (origin/main)

What this adds

A pure schedule derivation for the named-stream contract's bar lifecycle, plus its
tests. plan_schedule derives, from the retained state and a driving event only
(advance_time, bar_close, tick), the POST rows a run must compute, and
returns the next state; it performs no I/O and fetches nothing.

A timebase without time boundaries (a raw-label partition) is planned on data
alone: its bars open and close on their own events, it plans no PRE row, and it
keeps no bar end and no cursor.

Files

  • src/native_calc_plan.cpp, src/native_calc_plan.hpp (new) — the derivation and its state.
  • include/pineforge/native_calc_point.hpp (new) — the planned-point shape.
  • src/native_execution_consumer.cpp/.hpp — the consumer's slot lookup and engagement hook.
  • tests/test_native_calc_plan.cpp, tests/test_native_calc_identity.cpp (new) — the derivation and
    identity tests, including the frozen-frame cases and the raw-label cases.
  • CMakeLists.txt, tests/CMakeLists.txt — registration of the new source and the two tests.

Verification

  • One signed spot compile round: build green, ctest -R native_calc 4/4, all mutation
    controls observed to fail their named test, and the CI source guards rc 0.
  • An independent review of the test literals passed.
  • lab remote on this head: rj-20261011t085013-bd1ded (preflight, release 897/897, sanitizers 869/869, docs 0 warnings) and rj-20261011t085017-76182e (debug 878/878, kernel 328 rows, parity 312 probes, subset 54 probes): all eight steps passed.

🤖 Generated with Claude Code

luisleo526 and others added 3 commits October 11, 2026 16:50
…robe (lane ns-k1-02, Claude Sonnet 5.5 authored)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Removes the three checks that could not fail (two counters and their
comparisons; the third replaced by a static_assert tying the perturbation
array to std::tuple_size of State::tie()).

Adds tests for the walk's two termination guards, each with a mutation that
must fail, and a raw-label case: bars and POST rows planned, no PRE row.

R3: a raw-label partition holds no time interval, so its slot is unbounded;
an opened bar keeps no end and no cursor, and the time-close of an open bar
is gated by a boundary probe.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds three tests over the two unbounded clocks of the frozen no-boundaries
case: a Tick opens a lifecycle and plans one provisional POST row when the
cadence carries the tick bit; an AdvanceTime plans one provisional POST row
and closes nothing by time; a quiet interval plans nothing (the walk stops at
the unbounded slot). A bounded control shows the silence is the timebase's.
Tests only; no source change.
@luisleo526
luisleo526 marked this pull request as ready for review October 11, 2026 13:17
@luisleo526
luisleo526 merged commit 53d2a04 into main Oct 11, 2026
20 checks passed
@luisleo526
luisleo526 deleted the ns-k1-land branch October 11, 2026 15:04
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