Skip to content

chore(postgres): cover async harness prompts across database engines - #200051

Merged
vincentkoc merged 2 commits into
mainfrom
fix/borrowed-finalization-broker-admission-20261116
Nov 16, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/borrowed-finalization-broker-admission-20261116

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Extends the Gateway prompt checks to the public asynchronous harness API and both mixed SQLite/PostgreSQL layouts. Updates the measured scheduling cost for the expanded test.

Related: #199880

User Impact

Tests and CI scheduling metadata only. No runtime, schema version, DDL, migration, persisted format, operator configuration, or public API changes.

Why This Change Was Made

Reuse the real Gateway main-thread probe for PostgreSQL/PostgreSQL, PostgreSQL/SQLite, and SQLite/PostgreSQL. Check exact rendered watched-session text, rejection of a new call after harness authority closes, and removal of the prompt after its last watch disappears. Calibrate the SQL observer against the PostgreSQL store, then require zero host PostgreSQL statements during these operations.

The observer measures PostgreSQL only. This does not claim SQLite host-SQL absence, plugin-specific wiring, or revocation of an already-running call.

Evidence

Head: 65f765d3518ee216571ca647d697d7b4606ad3ab. Final-head CI checked out merge 6e32dcbab8b80df196f63ac7c209fa80dffe4330 over main 5c9ef285b21b0ba82ab8843618e6933b3d7002e3. All three full PostgreSQL shards passed.

All three changed cases executed and passed without skips in the final-head PostgreSQL job log:

State / agent engine Result
PostgreSQL / PostgreSQL Passed, 29.683s
PostgreSQL / SQLite Passed, 16.447s
SQLite / PostgreSQL Passed, 16.573s
  • The containing isolated test group passed 17/17. PostgreSQL shards 1/3, 2/3 and 3/3 all passed at the final head.
  • Build/artifact checks, production types, both core test-type stripes, and aggregate test types passed at e3c400d; runtime and test source are unchanged at the final head.
  • Independent review, formal autoreview through P2 (no findings, confidence 0.87), ClawSweeper source review, commit-hook formatting/line-cap checks, and git diff --check passed.
  • The full manual run is not green: other UI, tooling and provider tests failed, and PostgreSQL shard 3 reached its time limit later during workboard tests. These results are not claimed as a successful full suite. Final-head PR CI is tracked separately below.
  • The earlier focused Testbox allocation was stopped while queued; it supplied no test proof.
  • The timing entry now names the actual isolated test project and records a conservative 92.475s case span instead of the stale 4.66s value. Its source note identifies the measured job, head and limitations. The native allocator preserved all 192 targets without duplicates; the test moves from shard 3 to shard 1, with 121 total placement changes. No workers, timeouts or inventory rules changed, and a green full suite is not implied.
  • Independent source review and formal autoreview of the timing-only follow-up found no actionable issues (confidence 0.99).
  • Production delta: 0. Test/support delta: +73/-38; scheduling metadata: +3/-3.

The borrowed-finalization broker failure was already fixed by #199851 and is excluded from this diff.

Final-head CI and review

  • ClawSweeper reviewed 65f765d: no findings, before-merge items, or remaining rank-up moves. The reviewer did not execute target code and could not independently retrieve the earlier detailed test log.
  • PR CI run 43846392998 completed with all three full PostgreSQL shards, PG16 Gateway smoke (12/12), and security-fast passing. Overall CI is failed due to the infrastructure failures below.
  • Confirmed infrastructure failures: package boundary and baseline ratchets failed while provisioning Boat runners because the daily 2,400-start quota was exhausted. Their repository commands did not execute. All 14 direct failures have that startup signature. The SDK job could not publish its artifact, so dependent extension lint was skipped and the aggregate gate rejected the failed/skipped requirements. The workflow and runner inputs are unchanged in the tested merge. These are unavailable checks, not passing test results; landing uses the native attributed-failure exception under the existing maintainer instruction.

@vincentkoc vincentkoc self-assigned this Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR extends watched-session harness tests across three database layouts and updates their PostgreSQL scheduling weight.

Example: No user-visible behavior changes.

  • Before: Production behavior is unchanged.
  • After: Production behavior is unchanged.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct qualification patch supported by production-boundary harness evidence; no contributor-facing blocker was identified, and normal exact-head CI remains pending.
Proof confidence 🦐 gold shrimp (3/6) Tests and CI scheduling metadata change without user-visible runtime behavior; shipped-entry-point or upgrade proof is not required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: Maintainer-directed qualification covers distinct database and harness lifecycle boundaries using the existing fixture, without changing production contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR adds useful, maintainer-directed Gateway qualification coverage, with no actionable source findings.

Priority: P3
Reviewed head: 65f765d3518ee216571ca647d697d7b4606ad3ab

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway prompt preparation reads watched-session facts through database workers and renders them for agent harnesses; this PR extends the existing main-thread qualification probe.

flowchart TD
  A[Mixed database fixture] --> B[Gateway main thread probe]
  B --> C[Async harness API]
  C --> D[Watched session preparation]
  D --> E[State and agent workers]
  E --> F[Prompt and lifecycle assertions]
Loading

Technical review

Best possible solution:

Retain this focused extension of the existing Gateway probe and its measured scheduling entry.

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

No production defect is alleged; source inspection confirms the missing mixed-engine and public async harness coverage, and this review executed no target code.

Is this the best way to solve the issue?

The existing forked Gateway probe is the smallest complete extension: each database layout exercises a distinct placement boundary, and the added lifecycle assertions reuse production owners without adding runtime machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway main-thread watched-session qualification keeps the original intent (8e481ba: Exercise actual Gateway main-thread SQL restrictions, which worker-thread conformance bypasses.)
  • PostgreSQL conformance scheduling metadata keeps the original intent (ci(postgres): keep conformance shards within the job budget #183513: Price observed test occupancy so the existing allocator balances complete coverage within the job budget.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 8e481ba adds src/infra/database-engine/watched-sessions-prompt.main.test-support.ts:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8e481bae2299; files: src/infra/database-engine/watched-sessions-prompt.main.test-support.ts)
  • Peter Steinberger: Raw commit 54db475 adds config/postgres-conformance-timings.json:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 54db47573b45; files: config/postgres-conformance-timings.json)

PR surface

Tests +35, Other 0. Total +35 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 73 38 +35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 3 0
Total 3 76 41 +35

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is focused test qualification and scheduling maintenance without a production behavior change.
  • 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 execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-16T09:49:38.706Z sha e3c400d :: needs maintainer review before merge. :: none

Reviewed November 16, 2026, 5:15 AM ET / 10:15 UTC (Revision 2).

@vincentkoc
vincentkoc marked this pull request as ready for review November 16, 2026 10:06
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review head 65f765d3518ee216571ca647d697d7b4606ad3ab. The follow-up changes only the measured PostgreSQL test-cost entry and provenance. All three Gateway engine-pair cases passed without skips on the unchanged test source in job 133209836291. The full manual run was not green; fresh PR CI remains required.

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 16, 2026
@vincentkoc
vincentkoc merged commit 08588b1 into main Nov 16, 2026
137 of 154 checks passed
@vincentkoc
vincentkoc deleted the fix/borrowed-finalization-broker-admission-20261116 branch November 16, 2026 10:44
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…penclaw#200051)

* chore(postgres): cover async harness prompts across database engines

* test(postgres): refresh gateway admission timing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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