Skip to content

parity nits: reference-citation corrections, missing asserts, dead state - #172

Merged
lannbot merged 1 commit into
mainfrom
chore/parity-nits
Aug 20, 2026
Merged

parity nits: reference-citation corrections, missing asserts, dead state#172
lannbot merged 1 commit into
mainfrom
chore/parity-nits

Conversation

@lannbot

@lannbot lannbot commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

parity nits: reference-citation corrections, missing asserts, dead state

The D-class remainder of the definitions.py conformance review — the behavioral fixes landed in #164, and the adjudication items are tracked as #165#171. Nothing here changes observable behavior; the added asserts are reference-parity insurance on invariants callers already guarantee.

Code

  • Store.nestingDepth deleted (scheduler.ts): dead since inception. The reference's nesting_depth asserts tick is never reentered from inside lift; deltic's nested-driving architecture (the host-stream pump inside open brackets) is deliberate, so the guard doesn't map — and a dead field implies a checked invariant that isn't.
  • setMaxFlatResultssetMaxFlatResultsForTesting (flatten.ts), per the schedulerSeedForTesting convention for test-only knobs.
  • storeString write order (strings.ts): begin pointer then tagged length, matching store_string (definitions.py:1613-1616). Previously swapped; unobservable (no trap can intervene), fixed for parity.
  • sync-start-call result invariant (fact_calls.ts): onCallerResults's r ?? [] masked an arity invariant — the reference's sync canon_lower path can only deliver RETURNED results (a sync-lowered subtask has no handle, hence no cancel channel). Now assert_(r !== null).
  • Reference asserts added: unpackCallbackResult range (packed < 2**32), streamCopy's no-char-element and 4-bit packed-result asserts — all unreachable by construction, kept in step with the reference.

Comments

  • Thread.storage records the i64-above-2^53 precision limit (revisited at issue memory64 + shared-everything threads: deferred feature tracking #12's closure).
  • setSubtaskPendingEvent's !resolveDelivered() guard cross-linked to unwindLenders (the reference's subtask_event delivers unguarded and would assert on double delivery).
  • Stale definitions.py citations corrected across streams.ts, stream_builtins.ts, subtask.ts, intrinsics/context.ts, async_builtins.ts, intrinsics/mod.ts (Subtask.release_lenders — a name that no longer exists — → deliver_resolve), and handles.ts. Each correction was re-verified against the pinned submodule copy rather than taken from the review: two of the review's own suggested corrections turned out to be wrong (the originals were already right and were kept), and two needed different lines than the review proposed.

Gates

just gates — full pass. Conformance 1416 commands: 1257 passed, 0 failed, no expectation changes; sched-seeds clean (516/0 under both seeds). No published-surface change; lockstep version untouched per AGENTS.md.

The D-class remainder of the definitions.py conformance review (the
behavioral fixes landed in #164; adjudication items are tracked as
#165-#171). Nothing here changes observable behavior; the asserts added
are reference-parity insurance on invariants the callers already
guarantee.

Code:
  * Store.nestingDepth deleted — dead since inception; the reference's
    nesting_depth asserts tick is never reentered from inside lift,
    which deliberately does not map to deltic's nested-driving
    architecture, and a dead field implies a checked invariant that
    isn't.
  * setMaxFlatResults renamed setMaxFlatResultsForTesting (the
    schedulerSeedForTesting convention for test-only knobs).
  * storeString writes begin-then-length, matching store_string
    (definitions.py:1613-1616); previously swapped (unobservable).
  * sync-start-call's onCallerResults asserts r !== null instead of
    masking a cancelled resolution as [] — the reference's sync
    canon_lower path can only deliver RETURNED results (a sync-lowered
    subtask has no cancel channel).
  * unpackCallbackResult and streamCopy gain the reference's range/
    element asserts (packed < 2^32; result < 2^4; no char element).

Comments:
  * Thread.storage records the i64-above-2^53 precision limit (issue
    #12 will revisit).
  * setSubtaskPendingEvent's !resolveDelivered() guard cross-linked to
    unwindLenders (the reference delivers unguarded).
  * Stale definitions.py citations corrected across streams.ts,
    stream_builtins.ts, subtask.ts, intrinsics/context.ts,
    async_builtins.ts, intrinsics/mod.ts, handles.ts — each verified
    against the pinned submodule copy rather than taken from the
    review (two of the review's own corrections were off and the
    original citations kept; two others needed different lines than
    the review suggested).

Gates: just gates (full pass; conformance 1257/0, no expectation
changes; sched-seeds clean). No published-surface change; lockstep
version untouched.
@lannbot
lannbot enabled auto-merge August 20, 2026 20:58
@lannbot
lannbot merged commit cc65fa0 into main Aug 20, 2026
4 checks passed
@lannbot
lannbot deleted the chore/parity-nits branch August 23, 2026 16:51
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.

2 participants