Skip to content

test(gateway,agents,infra,sessions): remove low-value tests (batch d081) - #160205

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d081-1790569318
Sep 28, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d081-1790569318

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Redundant test variants and repeated fixtures make Gateway, agent, session, and migration tests more expensive to maintain without adding independent behavioral coverage.

User Impact

No production behavior changes. This batch removes or consolidates overlapping tests while retaining security, authority, migration, cleanup, rollback, and delivery regressions at their owning boundaries.

Why This Change Was Made

Replays the ten reviewed campaign shards in batch d081 onto main. All ten commits applied; none were skipped. Replay had no conflicts. After validation, the config-patch suite and its shared helper were retained unchanged from main because the consolidated execution order exposed an unresolved timing failure. Review also restored the distinct multi-agent migration case and four focused schema, delivery, and authentication contracts. Current-main additions were preserved. Replay type repairs use the canonical session runtime scope and the seed helper result type. Two metadata tests explicitly pre-pair their test device through the existing fixture helper after a diagnostic run exposed an implicit pairing dependency. The auth fixture gives each SQLite identity its own directory and closes its state handle before cleanup; the assertion-safety baseline shrinks exactly three existing counts.

Production LOC: +0 / -0. Tests and suites: +7,511 / -19,972 (net -12,461). Test support: +20 / -45 (net -25). Baseline metadata: +3 / -3, with three count reductions. Total test/support reduction: 12,486 lines across 267 fewer lexical test declaration sites. Declaration sites count line-start it/test calls, including parameterized declarations; they are not expanded test-case counts.

No changed paths match the current CODEOWNERS entries.

Evidence

  • Local oxfmt --write, plain oxlint -c .oxlintrc.json on changed TypeScript, and git diff --check: passed.
  • Initial focused Testbox run: 87 fast tests and 373 Gateway tests passed; the unchanged config-receipt test exceeded its two-second barrier. A plain-main comparison passed 600 Gateway tests. The config-patch cleanup and orphan-helper removal were withdrawn; no timeout or assertion was weakened.
  • Remaining initial groups: 371 tests passed. Diagnostic Gateway proof exposed two metadata tests depending on implicit device pairing; both now use the existing real pre-pairing fixture.
  • Final focused proof: 281 passed across nine test files / five routed groups, including all repaired/restored contracts. The remote verified tree 702e9f7e115a8f893b9f1f665347b02799730812 exactly matches the committed tree. Testbox run, lease tbx_01m3k8c0y4kdkjekdrzb3e6rw4, stopped.
  • Final OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <changed paths>: all core-test typechecks (including the repaired session shard), root-test types, repository guards, dead-export checks, and preceding lint stripes passed. It stopped on the untouched ui/src/pages/chat/components/chat-attachments.ts max-lines violation (716 vs 700), reproduced from the exact main-base blob using plain Oxlint. Current main fixes it in 2e95cdba84c2b7f697123aa0561da3e454605d7e (fix(ci): keep chat attachment controls within lint limit #160159). Later lint stages were not reached. Changed-gate run, lease tbx_01m3k9cnkchdq7bsgq6n45bznz, stopped automatically. Hosted CI evaluates the merge with current main.
  • Independent review: five accepted coverage gaps restored; eight original duplicate/obsolete-coverage findings rejected against surviving owner tests. Follow-up review returned one duplicate schema assertion request, rejected against agent-tools.schema.test.ts. No accepted/actionable finding remains.

The shard coverage results below are the original in-shard before/after measurements, not a newly aggregated coverage measurement on current main. All statement and branch drops are below 1%. t0016 uses the final repair comparison, which restored SQL/consumer failure, raw-delta, rollback, preparation-failure, and revocation cases. t0002 coverage also includes instrumented suite bodies, so these totals should not be interpreted as unique production coverage.

Per-shard replay size and campaign coverage
Shard Test/support LOC on replay Declaration sites Campaign coverage totals
t0004 5239 → 3265 (-1974) 66 → 46 (-20) covered statements 17262 -> 17269 (7); branches 9114 -> 9113 (-1); functions 3340 -> 3347 (7)
t0003 14726 → 12074 (-2652) 183 → 140 (-43) covered statements 26820 -> 26761 (-59); branches 17980 -> 17902 (-78); functions 4847 -> 4847 (0)
t0020 3593 → 2716 (-877) 90 → 68 (-22) covered statements 5752 -> 5749 (-3); branches 3068 -> 3063 (-5); functions 1049 -> 1046 (-3)
t0027 1281 → 462 (-819) 63 → 31 (-32) covered statements 1497 -> 1497 (0); branches 765 -> 764 (-1); functions 242 -> 242 (0)
t0035 2093 → 935 (-1158) 106 → 49 (-57) covered statements 1614 -> 1612 (-2); branches 734 -> 731 (-3); functions 175 -> 175 (0)
t0016 7384 → 5712 (-1672) 137 → 112 (-25) covered statements 8225 -> 8221 (-4); branches 4922 -> 4910 (-12); functions 1867 -> 1866 (-1)
t0024 1854 → 887 (-967) 40 → 19 (-21) covered statements 5370 -> 5361 (-9); branches 2682 -> 2671 (-11); functions 1043 -> 1041 (-2)
t0030 974 → 454 (-520) 19 → 11 (-8) covered statements 1432 -> 1431 (-1); branches 690 -> 684 (-6); functions 214 -> 213 (-1)
t0031 2401 → 1573 (-828) 36 → 25 (-11) covered statements 4016 -> 4046 (30); branches 3228 -> 3277 (49); functions 542 -> 545 (3)
t0002 5695 → 4676 (-1019) 110 → 82 (-28) covered statements 18232 -> 18055 (-177); branches 9738 -> 9709 (-29); functions 3397 -> 3367 (-30)

LOC and declaration deltas use only files actually touched by each replay commit. Campaign report test counts can include unchanged shard inputs and expanded parameter rows.

t0004 files: src/gateway/server.config-policy-response.test.ts, src/gateway/server.config-security-policy.test.ts, src/gateway/server.context-prewarm.remote-proof.test.ts, src/gateway/server.cron.test.ts, src/gateway/server.device-pair-approve-authz.test.ts, src/gateway/server.device-pair-approve-supersede.test.ts, src/gateway/server.device-scope-upgrade.test.ts, src/gateway/server.device-token-rotate-authz.test.ts

t0003 files: src/gateway/server.channels.test.ts, src/gateway/server.chat-abort-dispatch-rejection.test.ts, src/gateway/server.chat-abort-sibling-fanout.test.ts, src/gateway/server.chat-adopted-failure.test.ts, src/gateway/server.chat-goal.test.ts, src/gateway/server.chat-history-cursor.test.ts, src/gateway/server.chat-queued-followup.test.ts, src/gateway/server.chat.acp-completion.test.ts, src/gateway/server.chat.gateway-server-chat-b.test.ts, src/gateway/server.chat.gateway-server-chat.test.ts

t0020 files: src/infra/state-migrations.channel-pairing.test.ts, src/infra/state-migrations.commitments.test.ts, src/infra/state-migrations.config-machine-state.test.ts, src/infra/state-migrations.cron-run-logs.test.ts, src/infra/state-migrations.device-auth.test.ts, src/infra/state-migrations.device-identity.test.ts, src/infra/state-migrations.exec-approvals.test.ts, src/infra/state-migrations.fs.test.ts, src/infra/state-migrations.legacy-json.test.ts, src/infra/state-migrations.legacy-session-store.test.ts, src/infra/state-migrations.managed-outgoing-images.test.ts

t0027 files: src/agents/bash-tools.exec-target.test.ts, src/agents/bash-tools.exec-timeout-seconds.test.ts, src/agents/bash-tools.exec-workdir.test.ts

t0035 files: src/agents/embedded-agent-subscribe.tools.extract.test.ts, src/agents/embedded-agent-subscribe.tools.media.test.ts, src/agents/embedded-agent-subscribe.tools.reconcile-thread.test.ts, src/agents/embedded-agent-subscribe.tools.test.ts

t0016 files: src/config/sessions/session-accessor.sqlite-archive.byte-limit.test.ts, src/config/sessions/session-accessor.sqlite-archive.worker.test.ts, src/config/sessions/session-accessor.sqlite-bounded-context.test.ts, src/config/sessions/session-accessor.sqlite-byte-size.test.ts, src/config/sessions/session-accessor.sqlite-cap-archive.test.ts, src/config/sessions/session-accessor.sqlite-cleanup-race.test.ts, src/config/sessions/session-accessor.sqlite-cleanup-reclamation.test.ts, src/config/sessions/session-accessor.sqlite-context-accounting.test.ts, src/config/sessions/session-accessor.sqlite-data-version.test.ts, src/config/sessions/session-accessor.sqlite-deletion.test.ts, src/config/sessions/session-accessor.sqlite-entry-admission.test.ts, src/config/sessions/session-accessor.sqlite-excluded-rows.test.ts

t0024 files: src/infra/state-migrations.workspace-setup-sandbox.test.ts, src/infra/state-migrations.workspace-setup-shared-root.test.ts, src/infra/state-migrations.workspace-setup.test.ts

t0030 files: src/agents/bash-tools.test.ts

t0031 files: src/agents/embedded-agent-subscribe.before-terminal-delivery.test.ts, src/agents/embedded-agent-subscribe.block-reply-rejections.test.ts, src/agents/embedded-agent-subscribe.callback-fatal.test.ts, src/agents/embedded-agent-subscribe.deferred-reply-supersession.test.ts, src/agents/embedded-agent-subscribe.directive-delivery.block-code.test-support.ts, src/agents/embedded-agent-subscribe.directive-delivery.inline-code.test-support.ts, src/agents/embedded-agent-subscribe.directive-delivery.test.ts

t0002 files: config/assertion-safety-baseline.txt, src/gateway/server.auth.browser-hardening.test.ts, src/gateway/server.auth.compat-baseline.test.ts, src/gateway/server.auth.control-ui.bootstrap-lifecycle.suite.ts, src/gateway/server.auth.control-ui.mobile-bootstrap.suite.ts, src/gateway/server.auth.control-ui.pairing.suite.ts, src/gateway/server.auth.control-ui.trusted-proxy.suite.ts, src/gateway/server.auth.default-token.suite.ts, src/gateway/server.auth.identity-fixture.test-support.ts, src/gateway/server.auth.identity-scopes.test.ts, src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts

Independent review disposition

Five accepted gaps were restored: the hand-projected node timeout schema and ambiguous-key exclusion, accepted delivery followed by rejection, device-less Control UI rejection after failed proxy authentication, explicit requested scopes intersecting the declared proxy cap, and distinct per-agent workspace migrations.

Eight original findings were rejected after checking the surviving owners: configured-pattern sanitization remains in embedded-agent-tool-results.cache.test.ts; parent-segment rejection is common to both exec backends; browser-origin lockout with loopback exemption remains covered; CDP credential redaction remains in the snapshot owner (and this batch ultimately retains the original config-patch file); the removed cursor getter no longer created its claimed transaction race, while the real concurrent-writer snapshot test remains; transcript and recovery markers are asserted inside ACK callbacks; superseded pairing approval is rejected in device-pairing-churn.test.ts; and linked migration-source rejection is covered through the shared source-snapshot owner.

The follow-up review's sole finding requested a duplicate full-exec field-presence assertion. agent-tools.schema.test.ts already requires the public timeoutSeconds description to contain seconds, so removing the field fails that owner test. No accepted finding remains unresolved.

Port t0002 onto the campaign lane, retaining the two newer default-token identity tests and their suite-owned home directories unchanged. Preserve the lane assertion baseline while applying the shard fixture cleanup and intended test consolidations.

Validation: 104 tests across six files passed on Blacksmith Testbox with zero skips (79.95s); oxlint exited 0; oxfmt and diff checks passed; independent P2 review was clean. The first source sync timed out before tests; the unchanged retry passed without timeout increases.
@steipete
steipete enabled auto-merge (squash) September 28, 2026 06:29
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 28, 2026, 2:41 AM ET / 06:41 UTC.

ClawSweeper review

What this changes

Consolidates Gateway, agent, session, and migration tests and lowers three assertion-safety baseline counts without changing production code.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this useful consolidation open: three distinct exec and Doctor migration regression checks were removed without equivalent surviving coverage.

Priority: P3
Reviewed head: bff8b3e2452542033fa65ae2c254886f218c560f

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The consolidation has useful validation evidence, but three independent regression contracts need restoration.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: Repository permission confirms an administrator author, and the PR changes no production entrypoint. The body reports focused Testbox validation; no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository permission confirms an administrator author, and the PR changes no production entrypoint. The body reports focused Testbox validation; no stored-data contract changes.
Evidence reviewed 12 items Introduced exec coverage change: The pinned diff removes the normally completed foreground listener and late-update checks. The replacement yields a running process before checking callback cleanup.
Exec production branch: The exec owner has distinct settled and background results; listener and update cleanup runs afterward.
Removed canonical conflict proof: The old two-row Doctor test checked canonical milestone precedence, exact legacy archival, difference notices, a superseded receipt, and idempotent convergence.
Findings 3 actionable findings [P2] Restore the completed-foreground exec cleanup check
[P2] Keep the canonical workspace conflict migration case
[P2] Retain the orphan-attestation alias migration check
Security None None.

How this fits together

These suites exercise OpenClaw's exec tool, Gateway, session store, and Doctor migrations. CI uses their assertions to detect regressions in those production paths.

flowchart LR
Behavior[Production behavior] --> Suites[Consolidated test suites]
Fixtures[Commands and legacy state] --> Suites
Suites --> Assertions{Contracts retained?}
Assertions -->|Yes| CI[CI results]
Assertions -->|No| Gaps[Missed regressions]
CI --> Signal[Maintainer signal]
Loading

Before merge

  • Restore the completed-foreground exec cleanup check (P2) - The replacement forces a yielded, running process, while this patch removes the checks that a normally completed foreground call removes its abort listener and stops late onUpdate callbacks. The settled outcome is distinct from the yielded outcome, so add a focused settled-command case to the consolidated suite.
  • Keep the canonical workspace conflict migration case (P2) - Deleting the normal Doctor import case loses checks that canonical milestones survive divergent legacy setup data, the legacy bytes and differences are recorded, and another migration converges. The surviving case forces cleanup failure with only a bootstrap divergence; retain a focused normal-path superseded case.
  • Retain the orphan-attestation alias migration check (P2) - The deleted case verified that Doctor associates an orphan-discovered attestation with the configured symlink alias and that the imported state remains readable after the link disappears. Existing setup-move and generic alias-store tests do not exercise that discovery handoff; restore one focused migration assertion.
  • Complete next step (P2) - Restore the three identified regression checks in their consolidated suites and run the focused tests before merge.

Findings

  • [P2] Restore the completed-foreground exec cleanup check — src/agents/bash-tools.test.ts:206-229
  • [P2] Keep the canonical workspace conflict migration case — src/infra/state-migrations.workspace-setup.test.ts:408-409
  • [P2] Retain the orphan-attestation alias migration check — src/infra/state-migrations.workspace-setup.test.ts:79
Agent review details

Security

None.

PR surface

Source -352, Tests -6220, Other 0. Total -6572 across 70 files.

View PR surface stats
Area Files Added Removed Net
Source 5 51 403 -352
Tests 64 4398 10618 -6220
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 3 0
Total 70 4452 11024 -6572

Review metrics

Metric Value Why it matters
Assertion ratchet 3 counts reduced, 0 raised The baseline change tightens existing assertion-safety counts.

Technical review

Best possible solution:

Keep the smaller suites while restoring focused settled-exec, canonical-conflict, and orphan-alias assertions at their existing test owners.

Do we have a high-confidence way to reproduce the issue?

Yes. The pinned diff removes the named assertions, and surviving tests do not exercise those specific paths; this read-only review did not run tests.

Is this the best way to solve the issue?

No. The consolidation is useful, but these independent lifecycle and migration contracts need focused keeper tests before merge.

Full review comments:

  • [P2] Restore the completed-foreground exec cleanup check — src/agents/bash-tools.test.ts:206-229
    The replacement forces a yielded, running process, while this patch removes the checks that a normally completed foreground call removes its abort listener and stops late onUpdate callbacks. The settled outcome is distinct from the yielded outcome, so add a focused settled-command case to the consolidated suite.
    Confidence: 0.88
  • [P2] Keep the canonical workspace conflict migration case — src/infra/state-migrations.workspace-setup.test.ts:408-409
    Deleting the normal Doctor import case loses checks that canonical milestones survive divergent legacy setup data, the legacy bytes and differences are recorded, and another migration converges. The surviving case forces cleanup failure with only a bootstrap divergence; retain a focused normal-path superseded case.
    Confidence: 0.92
  • [P2] Retain the orphan-attestation alias migration check — src/infra/state-migrations.workspace-setup.test.ts:79
    The deleted case verified that Doctor associates an orphan-discovered attestation with the configured symlink alias and that the imported state remains readable after the link disappears. Existing setup-move and generic alias-store tests do not exercise that discovery handoff; restore one focused migration assertion.
    Confidence: 0.8

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cf6899819d15.

Labels

Label changes:

  • add P3: This is test-maintenance work with no introduced production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository permission confirms an administrator author, and the PR changes no production entrypoint. The body reports focused Testbox validation; no stored-data contract changes.

Label justifications:

  • P3: This is test-maintenance work with no introduced production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository permission confirms an administrator author, and the PR changes no production entrypoint. The body reports focused Testbox validation; no stored-data contract changes.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/agents/bash-tools.test.ts.
  • [P1] node scripts/run-vitest.mjs src/infra/state-migrations.workspace-setup.test.ts.
  • [P1] node scripts/check-changed.mjs -- src/agents/bash-tools.test.ts src/infra/state-migrations.workspace-setup.test.ts.

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Safzan Pirani: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a normally completed foreground exec case that checks listener removal and late update suppression.
  • Restore focused Doctor cases for divergent canonical milestones and orphan-attestation alias persistence.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 78d08ee into main Sep 28, 2026
223 of 239 checks passed
@steipete
steipete deleted the tcr/land-d081-1790569318 branch September 28, 2026 06:57
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…81) (openclaw#160205)

* test(gateway): deslop t0004 tests

* test(gateway): deslop t0003 tests

* test(infra): deslop t0020 tests

* test(exec): deslop t0027 tests

* test(agents): deslop t0035 tests

* test(sessions): deslop t0016 tests

* test(infra): deslop t0024 tests

* test(agents): deslop t0030 tests

* test(agents): deslop t0031 tests

* test(gateway): deslop t0002 tests

Port t0002 onto the campaign lane, retaining the two newer default-token identity tests and their suite-owned home directories unchanged. Preserve the lane assertion baseline while applying the shard fixture cleanup and intended test consolidations.

Validation: 104 tests across six files passed on Blacksmith Testbox with zero skips (79.95s); oxlint exited 0; oxfmt and diff checks passed; independent P2 review was clean. The first source sync timed out before tests; the unchanged retry passed without timeout increases.

* test: retain batch contracts and repair replay fixtures
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 3, 2026
Block 4 of the presentation cut: the message_end delivered-ledger
reconciliation, Responses multi-item delivery, the block-reply delivery
generation fence on compaction retry, and failed-block-reply retry. None of
it is needed by continuation: with continuation deleted, every hunk would
still be there. b875d57 records that upstream's own message_end
reconciliation (openclaw#146361) already runs first, and the generation bump keys on
any compaction_end.willRetry, not only volitional compaction.

HOME: its own PR (ledger reconciliation + delivery generation/retry).

Restored to upstream b51feb9 bytes: embedded-agent-subscribe.ts,
handlers.ts, handlers.lifecycle.ts, handlers.types.ts, handlers.tools.start.ts,
handlers.tools.progress.ts, handlers.messages.replies.ts, reply-delivery.ts,
run-state.ts, sanitize-user-facing-text.ts and their test fixtures/expectations.
Deleted fork-only files: handlers.messages.final-reconciliation.ts,
compaction-retry.ts, and the line-cap splits that only existed for the
ledger growth (logger.ts, reply-text.ts, reply-delivery.serial.ts,
reply-delivery.types.ts, stream-block-tags.ts); the ledger tests
block-reply-rejections.test.ts (upstream deleted it in openclaw#160205),
handlers.lifecycle.deferred-replies.test.ts (+ test-support) and
continuation-reconciliation.test.ts (no continuation input in any case).

What stayed (continuation): stripContinuationSignalFromDisplayText on the
message_end parsed text and on emitBlockChunk chunks; the commentary
deltaBuffer accumulation across all transports so markers can span deltas;
the two Responses marker-hiding cases in continuation-responses.test.ts.
Untouched here: snapshot.ts and messages.stream.ts strip hunks, compaction
attribution (other block). blockCoverageSourceText is re-grafted onto the
upstream emit path so #1373 can leave in its own commit.

Refs #1418

Co-Authored-By: Claude Opus 5.5 <[email protected]>
amittell added a commit to amittell/openclaw that referenced this pull request Oct 9, 2026
Brings the branch onto current main; GitHub reported it CONFLICTING.

- media-reference.ts: openclaw#158720 moved parseInboundMediaUri,
  MediaReferenceError and normalizeMediaReferenceSource into
  inbound-media-uri.ts. The raw-authority check that rejects port and
  userinfo forms moved with them; media-reference.ts keeps the grounding
  exports and re-exports the parser as main does.
- embedded-agent-tool-media.ts: main now collects structured media into a
  Set. The candidate caps, acceptMediaUrl and hadCandidate apply to that Set
  (size in place of length); recordToolResultLocalMediaReplayAuthorization
  and filterPersistedToolResultMediaUrls are unchanged.
- session-tool-result-guard-wrapper.ts: main's GuardedSessionManager type
  and preparedUserTurn handoff, plus setTrustedLocalMediaToolNames.
- session-accessor.sqlite-active-events.ts: main moved the page types to
  session-accessor.sqlite-projection-read.ts, which session-accessor.ts now
  re-exports them from. The snapshot row type joins them there, and
  readSessionTranscriptConversationSnapshot imports
  DEFAULT_VISIBLE_MESSAGE_MAX_MESSAGES from the visible-cursor module.
- attempt-session-runtime-prepare.test.ts: both fixture fields kept.
- embedded-agent-subscribe.tools.media.test.ts: main deleted the file in its
  low-value test batches (openclaw#158721, openclaw#160205, openclaw#166619). Only this branch's own
  tests are kept: the candidate bounds, the legacy details.path
  acceptMediaUrl check, and the persisted replay authority cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant