Skip to content

test: restore agent artifact and maintenance fixture contracts - #168084

Merged
steipete merged 1 commit into
mainfrom
steipete/lane709c-artifact-pending
Oct 10, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/lane709c-artifact-pending

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes two deterministic test failures exposed by the agent-config acknowledgement change in #167894 and the proxy output-budget correction in #167878.

User Impact

No production behavior changes. The Gateway artifact composition and restart-safe maintenance tests exercise their intended contracts again without weakening the new production safeguards.

Why This Change Was Made

The artifact fixture started a Gateway without a managed hot-reload recovery owner. Its reload already failed before #167894, but immediate success acknowledgements followed by explicit test restarts hid that failure. Supply the same fail-on-call recovery callback used by the existing agent readiness test and assert that no recovery restart occurs.

The maintenance fixture supplied requests estimated at 40,116 and 35,527 tokens to a synthetic 32,768-token model, whose server ignored the old unusable output cap. Increase its context to 49,152 and maintenance reserve to 24,576 together. The required-maintenance threshold stays 24,576, the earlier flush threshold stays 20,576, and the transcript, retention geometry, exact-input assertions, and expected 0/1 compactions remain unchanged.

Production LOC delta: 0. This is a repair to two existing fixtures; no production machinery is added or retained by the change.

Evidence

The introducing commits are isolated by direct parent/child comparisons. They are the only two commits in the first-parent interval from 05464f1c2e3d to e05ca71024a4.

Revision Artifact APIs Pending input
05464f1c2e3d Pass 3/3 Previously cleared 3/3
c26d9db0c627 (#167894) Fail 3/3 Pass 3/3
e05ca71024a4 (#167878) — Fail 3/3
959197ba0923 Fail 3/3 —
Main at cb9bdcd6e78f Fail 3/3 Fail 3/3
Same main plus this diff Pass 3 consecutive repetitions Pass 3/3

Artifact had one earlier 120-second timeout under concurrent rig load. After this lane's typecheck workload was paused, it passed three times with the unchanged timeout (test bodies 37.68s, 33.54s, 41.18s). The complete passing workflow is exercised, including the assertion that no recovery restart occurred. Pending-input test bodies were 35.60s, 34.11s, and 27.36s. These are behavior comparisons, not throughput measurements.

Related sibling suites: 72 passed. Two optional-memory private-transcript cases fail identically on unchanged cb9bdcd6e78f, at agent-runner-memory.private-transcript.test.ts:324; both expect a boolean to be true and receive false. The changed files do not modify that fixture or its production owners.

The staged changed gate passed 22 checks, including formatting, both selected test typecheck graphs, lint/boundary/ratchet guards, and deprecated-API checks. Its only failure was the dead-export scan, reproduced exactly on unchanged cb9bdcd6e78f: production reports isTelegramReadOnlyControlLaneText, buildDirectChatContext, and resolveContextTokens; full-tree reports only isTelegramReadOnlyControlLaneText; the script scan passes. No guard was skipped or suppressed.

Independent Codex review: scoped-clean through P2, no actionable findings.

All executions use whole files, Node 24.19.0, pnpm 12.7.0, CI=1 OPENCLAW_VITEST_MAX_WORKERS=2 NODE_OPTIONS=--max-old-space-size=8192, and explicit --maxWorkers=2. Remote Linux rig fallback was used after Blacksmith Testbox tbx_01m4hkgp82q63rrvc2kr2t4h76 had no runner for over 15 minutes, AWS supplied insufficient memory, and Hetzner failed SSH trust setup. All leases were stopped/released. This is rig proof, not Testbox proof.

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-server-isolated.config.ts --maxWorkers=2 src/gateway/server.agent-artifact-apis.test.ts
node scripts/run-vitest.mjs run --config test/vitest/vitest.infra.config.ts --maxWorkers=2 src/auto-reply/reply/agent-runner-required-maintenance.pending-input.test.ts
node scripts/check-changed.mjs --staged
node --import tsx scripts/check-deadcode-exports.mts

No local test, build, or typecheck was run. No production code, schema, public API, or configuration option changes.

Supply the artifact Gateway fixture's managed reload recovery owner and assert that recovery never runs. Give the pending-input synthetic model enough transport headroom while preserving its maintenance thresholds and original assertions.\n\nRefs #167894 and #167878.
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 10, 2026
@steipete
steipete marked this pull request as ready for review October 10, 2026 01:52
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR supplies the artifact Gateway fixture’s recovery callback and increases the maintenance fixture’s synthetic model capacity while preserving its maintenance thresholds.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, correct fixture repair supported by source contracts and reported controlled harness runs; validation is harness-based.
Proof confidence 🦐 gold shrimp (3/6) Maintainer-authored fixture repair with no production behavior change; reported validation exercises the existing real-Gateway and agent-runner harnesses, rather than a shipped CLI or live channel.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: No production behavior changes; two existing integration fixtures fail before completing their intended regression coverage.
Reason: The repairs restore independent composition coverage without weakening the production changes or replacing existing assertions.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs two concrete fixture failures while preserving the production safeguards and existing behavioral assertions; no actionable patch defects were found.

Priority: P2
Reviewed head: 837d1b2e1717d9b8bc36dcef019dd4ed63f16023

Before merge

None.

Findings

None.

Agent review details

How this fits together

These integration fixtures send operator RPCs through a real Gateway and restart-safe requests through the agent runner, checking artifact bytes, checkpoint writes, and preserved user input.

flowchart TD
  A[Test fixtures] --> B[Gateway RPC server]
  B --> C[Agent configuration and artifacts]
  A --> D[Reply agent runner]
  D --> E[Maintenance and transcript owners]
  D --> F[Synthetic HTTP provider]
Loading

Technical review

Best possible solution:

Land the focused fixture repairs while retaining the existing production budget and reload safeguards.

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

Source explains both fixture failures, and the author reports controlled failing-base and passing-patch runs; this read-only review did not execute tests.

Is this the best way to solve the issue?

The changes repair the fixture prerequisites at their owners, preserve maintenance thresholds and exact-input assertions, and make an unexpected recovery restart fail explicitly.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c00651360053.

Provenance checked

  • Restart-safe pending-input maintenance fixture keeps the original intent (60adac1: Exercise private required checkpoints, preserved admitted input, and intentional no-op versus committed compaction.)
  • Maintenance fixture isolation keeps the original intent (1b694b9: Avoid unrelated channel discovery while retaining real HTTP, admission, transcript, and checkpoint behavior.)
  • Agent and artifact composition fixture keeps the original intent (e4b6bde: Cover agent configuration and transcript-backed artifact APIs through a real Gateway and operator client.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff changes only fixture capacity, the maintenance reserve, and the Gateway recovery callback with its negative assertion; production code is unchanged. (837d1b2e1717)
  • Thresholds remain unchanged: The threshold owner subtracts the reserve from context capacity: both 32,768 minus 8,192 and 49,152 minus 24,576 equal 24,576; subtracting the unchanged 4,000 soft margin retains the 20,576 early-flush threshold. (src/auto-reply/reply/memory-flush.ts:40, 837d1b2e1717)
  • Recovery callback follows the existing fixture contract: The existing agent-readiness test supplies the same fail-on-call recovery callback; startup uses callback presence to establish recovery availability, and the changed artifact fixture asserts that recovery never runs. (src/gateway/server.agents.config-readiness.test.ts:83, 837d1b2e1717)
  • Transport capacity contract: The production completions transport rejects proxy requests whose estimated remaining output budget falls below 16 tokens; increasing synthetic capacity avoids that unrelated refusal without changing the transport safeguard. (packages/ai/src/transports/openai-completions-params.ts:458, 837d1b2e1717)
  • Original coverage intent: History across the artifact test’s earlier path identifies its composed API coverage origin; the maintenance fixture’s history identifies preserved admitted input and private checkpoint execution as its contracts. (src/gateway/server.agent-artifact-apis.test.ts:205, e4b6bde45a07)
  • Reported validation and current-main necessity: The full PR body reports parent/child failure comparisons and passing repetitions after the fixture repairs; fetched main still contains the original fixture settings, with no changes to either touched file since the merge base. (c00651360053)

Likely related people:

  • Vincent Koc: Raw commit e4b6bde adds test/e2e/qa-lab/runtime/gateway-agent-artifact-apis.e2e.test.ts:213 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e4b6bde45a07; files: test/e2e/qa-lab/runtime/gateway-agent-artifact-apis.e2e.test.ts)

PR surface

Tests +6. Total +6 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 9 3 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 9 3 +6

Review metrics

Metric Value Why it matters
Production versus test changes Production 0; tests +9/-3 lines The small test-only change restores fixture prerequisites and adds a recovery-path assertion without new production machinery.

Labels

Label changes:

  • add P2: Concrete integration-fixture failures reduce useful regression coverage, with no demonstrated production outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Concrete integration-fixture failures reduce useful regression coverage, with no demonstrated production outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 9, 2026, 9:57 PM ET / October 10, 2026, 01:57 UTC.

@steipete
steipete merged commit 76dca73 into main Oct 10, 2026
179 checks passed
@steipete
steipete deleted the steipete/lane709c-artifact-pending branch October 10, 2026 02:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…law#168084)

Restore the agent/artifact Gateway fixture's required hot-reload recovery owner and assert that recovery never runs. Raise the pending-input synthetic model's context and maintenance reserve together, preserving the original thresholds and exact-input assertions.

Both failures are fixture drift exposed by the correct production contracts in openclaw#167894 and openclaw#167878. Direct parent/child comparisons isolate each introduction; both repaired whole files pass three repetitions on Linux with Node 24.19.0 and two workers. Independent review found no actionable P0-P2 issues. No production code changes.
RomneyDa added a commit that referenced this pull request Oct 10, 2026
…#168084)

The backported proxy output-budget fix (#167878) leaves the 32,768-token
synthetic model no output room, so preflight maintenance reported context
overflow. Raise the fixture window to 49,152 tokens with a 24,576-token
reserve floor, keeping the original maintenance threshold.

Partial backport: only the pending-input test file from main #168084.
(partially cherry picked from commit 76dca73)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 22, 2026
…openclaw#168084)

The backported proxy output-budget fix (openclaw#167878) leaves the 32,768-token
synthetic model no output room, so preflight maintenance reported context
overflow. Raise the fixture window to 49,152 tokens with a 24,576-token
reserve floor, keeping the original maintenance threshold.

Partial backport: only the pending-input test file from main openclaw#168084.
(partially cherry picked from commit 76dca73)

(cherry picked from commit 4cd8f26)
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant