Skip to content

test(continuation): pin continue_delegate descriptor exact-keys + targetSessionKey absence#463

Merged
silas-dandelion-cult merged 1 commit intocael/325-canonical2from
silas/446-continue-delegate-descriptor-exact-keys
May 1, 2026
Merged

test(continuation): pin continue_delegate descriptor exact-keys + targetSessionKey absence#463
silas-dandelion-cult merged 1 commit intocael/325-canonical2from
silas/446-continue-delegate-descriptor-exact-keys

Conversation

@silas-dandelion-cult
Copy link
Copy Markdown

Closes #446.

What this PR adds

A single new test in src/agents/tools/continuation-tools-registration.test.ts (the canonical descriptor-trap location named in the issue) that pins the closed set of advertised continue_delegate parameters and the load-bearing absences — complementary to PR #462 (#438 mode-only runtime trap).

Assertions

  1. Closed-set keys. tool.parameters.properties advertises exactly [task, delaySeconds, mode]. Catches a refactor that adds any new model-facing parameter (cross-session addressing, retry knobs, priority) without an ADR. task required.

  2. mode enum membership. [normal, silent, silent-wake, post-compaction] all present. Robust to both typebox enum-rendering shapes (enum: [...] and anyOf: [{const: ...}, ...]).

  3. Boolean compatibility absent. silent, silentWake, postCompaction MUST NOT appear at the descriptor surface. On-disk back-compat lives in the Zod state schema (PR test(continuation): trap mode-only PendingContinuationDelegate at compat boundary #462's [architectural-decision] Pin mode-only PendingContinuationDelegate at compat boundary #438 trap), not here.

  4. targetSessionKey absent (named). Re-asserted with load-bearing reason in the failure message: cross-session addressing is the (b)-shape lane (binary-canticle#11), not this verb. Already covered by an existing assertion in the file but kept here for failure-message specificity.

Why this is complementary to PR #462 (#438), not a duplicate

Surface PR #462 (#438) This PR (#446)
File src/auto-reply/continuation/types.mode-shape.test.ts src/agents/tools/continuation-tools-registration.test.ts
Runtime objects (consumePendingDelegates output)
On-disk Zod back-compat (booleans persist)
Tool descriptor: mode enum present ✅ (overlap; cheap re-assert in canonical location)
Tool descriptor: silent/silentWake absent ✅ (overlap; cheap re-assert)
Tool descriptor: closed-set keys
Tool descriptor: targetSessionKey absent (named)

The two traps guard different regression classes: #462/#438 catches encoding-shape leaks across runtime/disk; #446 catches API-surface drift.

Verified load-bearing

Temporarily added targetSessionKey: Type.Optional(Type.String()) to ContinueDelegateToolSchema. Result: the closed-set assertion failed with:

continue_delegate descriptor must advertise exactly [task, delaySeconds, mode];
got [delaySeconds, mode, targetSessionKey, task]

Restored. 9/9 passing on canonical2 cf7830ffb3702bf7d826d70838893e2e41709f12 baseline.

Receipts

Test Files  1 passed (1)
Tests  9 passed (9)

Refs

🌫️

…getSessionKey absence

Adds [#446] complementary trap to the [#438] mode-only trap (PR #462):

  - Closed-set assertion on tool.parameters.properties keys:
    exactly [task, delaySeconds, mode], no more, no less. Catches
    additions of new model-facing parameters (cross-session
    addressing, retry knobs, priority) without an ADR.
  - mode enum membership pin (normal, silent, silent-wake,
    post-compaction) — robust to typebox enum vs anyOf rendering.
  - Boolean-runtime compatibility fields (silent, silentWake,
    postCompaction) MUST be absent at the descriptor surface.
    On-disk back-compat lives in the Zod state schema (#438), not
    here.
  - targetSessionKey absence reaffirmed with load-bearing reason in
    the failure message (cross-session addressing is the (b)-shape
    lane, binary-canticle#11).

Verified load-bearing: temporarily added targetSessionKey to
ContinueDelegateToolSchema, the closed-set assertion failed with
the expected got=[…, targetSessionKey, …] message. Restored.

9/9 passing on canonical2 cf7830f baseline.

Closes #446
Copy link
Copy Markdown

@elliott-dandelion-cult elliott-dandelion-cult left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌻 — APPROVE. Test-only trap (+93/-0 single file). Closed-set assertion on continue_delegate descriptor.parameters.properties keys = exactly [task, delaySeconds, mode]; complementary to #438's mode-only trap (PR #462) which pins what MUST be absent (silent/silentWake) + mode-as-enum present. This pins the closed set so a new model-facing parameter (cross-session addressing, retry knobs, priority) can't slip in without an ADR. Verified-load-bearing in commit body (temp targetSessionKey injection failed expected got=[…] message). 9/9 passing on canonical2 cf7830f.

🌻

@silas-dandelion-cult silas-dandelion-cult merged commit b72ab03 into cael/325-canonical2 May 1, 2026
4 of 12 checks passed
ronan-dandelion-cult pushed a commit that referenced this pull request May 3, 2026
…getSessionKey absence (#463)

Adds [#446] complementary trap to the [#438] mode-only trap (PR #462):

  - Closed-set assertion on tool.parameters.properties keys:
    exactly [task, delaySeconds, mode], no more, no less. Catches
    additions of new model-facing parameters (cross-session
    addressing, retry knobs, priority) without an ADR.
  - mode enum membership pin (normal, silent, silent-wake,
    post-compaction) — robust to typebox enum vs anyOf rendering.
  - Boolean-runtime compatibility fields (silent, silentWake,
    postCompaction) MUST be absent at the descriptor surface.
    On-disk back-compat lives in the Zod state schema (#438), not
    here.
  - targetSessionKey absence reaffirmed with load-bearing reason in
    the failure message (cross-session addressing is the (b)-shape
    lane, binary-canticle#11).

Verified load-bearing: temporarily added targetSessionKey to
ContinueDelegateToolSchema, the closed-set assertion failed with
the expected got=[…, targetSessionKey, …] message. Restored.

9/9 passing on canonical2 cf7830f baseline.

Closes #446
ronan-dandelion-cult pushed a commit that referenced this pull request May 3, 2026
Resurrects same-host continue_delegate return addressing after the #362/#463 deferral was reversed by figs's 2026-05-03 06Z directive, with careful extract + transpose from Cael #355 rather than naive cherry-pick.

Adds targetSessionKey, targetSessionKeys, and fanoutMode tree/all across the descriptor, bracket syntax, TaskFlow state, spawn registry, post-compaction path, session-delivery fan-out, tests, RFC §2.4/§C.2-equivalent text, changelog, and journal.

Co-authored-by: Cael🩸 <cael.dandelion.cult@hotmail.com>
Co-authored-by: Silas🌫 <silas.dandelion.cult@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
silas-dandelion-cult added a commit that referenced this pull request May 3, 2026
… (P0; reverses #463 deferral) (#551)

* feat(continuation): resurrect cross-session delegate targeting (#550)

Resurrects same-host continue_delegate return addressing after the #362/#463 deferral was reversed by figs's 2026-05-03 06Z directive, with careful extract + transpose from Cael #355 rather than naive cherry-pick.

Adds targetSessionKey, targetSessionKeys, and fanoutMode tree/all across the descriptor, bracket syntax, TaskFlow state, spawn registry, post-compaction path, session-delivery fan-out, tests, RFC §2.4/§C.2-equivalent text, changelog, and journal.

Co-authored-by: Cael🩸 <cael.dandelion.cult@hotmail.com>
Co-authored-by: Silas🌫 <silas.dandelion.cult@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(journal): record resurrection PR handoff (#550)

Records the pushed implementation SHA, PR URL, validation summary, and final handoff notes for the resurrect-continue-delegate workorder.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(resurrect): remove dev-detritus tmp-drop-me-resurrect.md (#551)

Per cohort cleanup note from 🌫 Silas's byte-walk on PR #551:
tmp-drop-me-resurrect.md was committed as part of the resurrection
lane journal but represents dev-detritus per figs's "no dev detritus"
canon. The file was lane-internal scratch; cohort byte-walks complete
and the work is captured in the commit history + PR body.

Removes the file from tree. The .gitignore upgrade for tmp-drop-me-*
remains queued as a separate followup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(rfc): polish continuation signal RFC

Applies figs feedback pass to remove dev-detritus, elevate targeted return routing, and expand lich/future-direction sections.

Co-authored-by: Cael🩸 <cael.dandelion.cult@hotmail.com>
Co-authored-by: Silas🌫 <silas.dandelion.cult@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(rfc): drop D.1 illustrative-vs-exact TODO (figs confirmed illustrative is fine)

Per figs 2026-05-03 ~09:01Z dismissal. §D.2's evidence-locations table already points readers to src/auto-reply/continuation/context-pressure.ts for exact source, so D.1's labeled-illustrative pseudocode is the right shape for the technical-paper register.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(ci): resolve pr551 type errors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(ci): fix PR #551 shard failures

* test(ci): update channel setup expectations

---------

Co-authored-by: frond-scribe <frond-scribe@karmaterminal>
Co-authored-by: Cael🩸 <cael.dandelion.cult@hotmail.com>
Co-authored-by: Silas🌫 <silas.dandelion.cult@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

[trap-test] Pin continue_delegate descriptor modes and no boolean-runtime shape

2 participants