Skip to content

Fix canonical Bay redirect smoke - #1183

Merged
brokemac79 merged 2 commits into
mainfrom
codex/bay-smoke-query-strip
Aug 17, 2026
Merged

brokemac79 merged 2 commits into
mainfrom
codex/bay-smoke-query-strip

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Align the live dashboard smoke test with the canonical privacy-preserving Bay
redirect that landed in #1180. A request to the legacy Bay route may contain a
query, but its permanent redirect must point to the queryless /bay route.

Problem

The Worker correctly deployed #1180 and stripped the legacy query. The automatic
dashboard smoke still expected the older query-preserving redirect, so the
deployment run failed after the Worker deployment and all earlier live checks
had succeeded.

Failed deployment-smoke evidence:
https://github.com/openclaw/clawsweeper/actions/runs/32004437979

Implementation

  • centralize the canonical legacy redirect assertion in a small exported smoke
    helper;
  • require status 308 and an exact queryless /bay location;
  • add a regression that accepts the canonical redirect and rejects the former
    query-preserving location.

No Worker behavior, API response, public data projection, credentials, queue
state, or production configuration changes.

Validation

  • pnpm run build:all
  • node --test --test-concurrency=1 test/dashboard-smoke.test.ts test/dashboard-worker-bay-records-routes.test.ts
    — 52 passed, 0 failed
  • pnpm run check:docs
  • pnpm exec oxfmt --check scripts/dashboard-smoke.mjs test/dashboard-smoke.test.ts docs/proof/openclaw-bay/README.md
  • pnpm exec oxlint --deny-warnings scripts/dashboard-smoke.mjs test/dashboard-smoke.test.ts
  • git diff --check
  • dirty Codex reviews before both commits — no actionable findings
  • committed Codex review against origin/main at the exact final head — no
    actionable finding; its optional tsx probe was unavailable, while the
    repository's actual Node test command and the controlled proof below passed
  • local ClawSweeper committed-range review at the exact final head — patch
    correct, confidence 0.95, no code or security finding; its requested real
    smoke evidence is supplied below

Review finding disposition

  • Accepted: hosted ClawSweeper identified stale proof wording that still
    described the legacy redirect as query-preserving. The documentation now
    says query-stripping and the exact-head regression rejects the old contract.
  • Resolved by proof: both hosted and local ClawSweeper requested a
    current-head Docker-backed behavior receipt. The Crabbox local-container
    execution below proves the exact committed files and redirect oracle, while
    the read-only live run proves the complete deployed Worker smoke path.

Real Behavior Proof

Claim: the corrected smoke accepts the deployed canonical query-stripping
redirect while preserving the rest of the dashboard deployment contract.

Exercised surface: the exact committed smoke oracle in Crabbox's
Docker-backed local-container provider, plus the committed smoke script against
the live Worker already deployed from squash
68a6dfcfc5564acddc788a746d9399e44ac00969.

Scenario: send the legacy route a query-bearing read-only request with manual
redirect handling, require an exact queryless /bay location, then continue the
existing health, status, queue, Bay HTML, CSP, no-browser-GitHub, and asset checks.

Command/environment — exact-head controlled proof: Crabbox provider
local-container; lease cbx_34215d350dc3; run run_22f628223302; image
mcr.microsoft.com/playwright:v1.60.0-noble at digest
sha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948;
Node 24.15.0; repository hydration disabled; clean raw-workspace sync. The
content-hashed proof script ran the committed redirect tests and direct helper
assertions without production access.

Command/environment — read-only live proof:

$env:CLAWSWEEPER_EXPECTED_DEPLOY_SHA = '68a6dfcfc5564acddc788a746d9399e44ac00969'
pnpm run dashboard:smoke -- 'https://clawsweeper.openclaw.ai'

Observed result: Crabbox exit 0 with 6 passed, 0 failed; all three changed
files matched the hashes from the clean committed tree; the queryless redirect
was accepted, the former query-preserving redirect was rejected, and the proof
documentation was current. The disposable lease stopped automatically. The
read-only live smoke also exited 0, matched the expected deployed revision,
accepted the canonical redirect, completed every subsequent live assertion, and
reported zero direct browser-to-GitHub requests.

Inspectable redacted terminal receipt:

provider=local-container
lease=cbx_34215d350dc3
run=run_22f628223302
image=mcr.microsoft.com/playwright:v1.60.0-noble
node=v24.15.0
sync_candidate_files=1235
sync_bytes=24.5 MiB
tests=6
pass=6
fail=0
exact_head=true
exact_tree=true
exact_changed_files=true
queryless_redirect_accepted=true
query_preserving_redirect_rejected=true
documentation_current=true
stderr_bytes=0
exit=0
lease_stopped=true

The separate read-only live terminal completed the repository's full
dashboard:smoke command with the expected deployment revision, canonical
redirect, health/status/queue/Bay/CSP/assets checks, and
direct_github_requests=0; exit was 0. No response bodies, credentials, private
repository data, or production mutations are included in this receipt.

Artifact/trace: exact patch head
298b1da03a7bef67a1766c669b8d044430b5c5bc; tree
2e999b3b3c66abf40ef1da5c3620fa90c23822c4. Crabbox proof-script SHA-256
c6b74ac880428846dfcd9b3676487ef5fe8dc3d21d8e0b6f17b81c7d4eaf2e91;
stdout SHA-256
5579adf2149872c491bc8a6d7c1a2dfbb068b75181f562fe190c1568980fed07;
empty-stderr SHA-256
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.
Final local ClawSweeper artifact SHA-256
4d37e2d7597d736d39cda8185b993b3989d86d717db250fc58c636997bb9ccc0.

Limits: this is a read-only smoke-oracle correction. It proves behavior
against the already deployed Worker and does not deploy, mutate queues, call a
workflow action, or change production state.

Risk and rollout

Low risk: three files, no runtime Worker change. The automatic dashboard workflow
will exercise the same smoke after merge. Revert this commit if the oracle causes
an unexpected compatibility issue; reverting #1180 would instead restore the
privacy regression and is not recommended.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 3:46 AM ET / 07:46 UTC.

ClawSweeper review

What this changes

The PR updates the dashboard deployment smoke test to require legacy Bay URLs with queries to redirect permanently to queryless /bay, with a regression test and matching proof-document wording.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR is a focused, correct repair for a dashboard deployment-smoke false failure and has sufficient exact-head and live behavior evidence. It is ready for ordinary maintainer review.

Priority: P3
Reviewed head: 298b1da03a7bef67a1766c669b8d044430b5c5bc

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow correction with direct regression coverage and strong terminal evidence for both the exact branch and deployed behavior.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.
Evidence reviewed 5 items Current Worker redirect contract: Current main handles /bay-demo with a 308 redirect constructed to the origin’s queryless /bay URL.
Focused smoke correction: The branch replaces the obsolete query-preserving assertion with a shared exact 308/queryless-location predicate used by the live smoke.
Regression coverage: The new test accepts the canonical location and rejects the former query-preserving location.
Findings None None.
Security None None.

How this fits together

The dashboard smoke script probes the deployed ClawSweeper dashboard after a Worker release. It verifies the legacy Bay redirect before continuing health, status, Bay rendering, CSP, and asset checks.

flowchart LR
  A[Legacy Bay URL with query] --> B[Dashboard deployment smoke]
  B --> C[Canonical redirect check]
  C --> D[Queryless Bay route]
  D --> E[Health and Bay checks]
Loading

Before merge

  • Resolve merge risk (P1) - The smoke now intentionally requires the Worker’s current absolute 308 location; a future equivalent relative-location contract would need an explicit smoke-contract update.
  • Complete next step (P2) - No discrete repair remains; the PR has current proof and awaits ordinary maintainer review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Focused patch footprint 3 files; script +6/-5, tests +23, docs +1/-1 The change is limited to the smoke oracle, its regression coverage, and wording that describes that contract.

Merge-risk options

Maintainer options:

  1. Land the corrected redirect oracle (recommended)
    Accept the intentional automation-contract change because current main explicitly emits the exact queryless 308 target and the branch proves both accepted and rejected outcomes.

Technical review

Best possible solution:

Land the queryless redirect oracle and retain its positive and negative regression coverage so the deployment smoke follows the privacy-preserving Worker contract.

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

Yes—current main emits a queryless /bay redirect while the base smoke asserted a query-preserving location; the PR also links the resulting deployment-smoke failure.

Is this the best way to solve the issue?

Yes—the shared predicate makes the live smoke and regression test enforce the Worker’s existing canonical redirect contract without changing runtime behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk deployment-smoke correction with no production Worker behavior change.
  • merge-risk: 🚨 automation: Merging changes the post-deploy smoke pass condition used by dashboard automation.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains an exact-head Docker-backed terminal receipt and a redacted read-only live smoke result that observes the corrected redirect and the remaining dashboard checks.

Evidence

What I checked:

Likely related people:

  • Martin Cleary: Current main’s merged Bay redirect contract is recorded in the related merged change. (role: recent Bay contract contributor; confidence: high; commits: 68a6dfcfc556; files: dashboard/worker.ts)
  • Peter Steinberger: Blame attributes the pre-existing dashboard smoke assertion to this feature-history path. (role: original smoke-path contributor; confidence: high; commits: 5439582beebe; files: scripts/dashboard-smoke.mjs)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-17T07:22:18.566Z sha 24bf5f3 :: needs real behavior proof before merge. :: [P3] Update the Bay proof redirect wording
  • reviewed 2026-08-17T07:26:08.893Z sha 24bf5f3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-17T07:39:38.031Z sha 298b1da :: needs real behavior proof before merge. :: none

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 17, 2026
@brokemac79
brokemac79 marked this pull request as ready for review August 17, 2026 07:48
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Fix canonical Bay redirect smoke This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@brokemac79
brokemac79 merged commit 115abf8 into main Aug 17, 2026
23 checks passed
@brokemac79
brokemac79 deleted the codex/bay-smoke-query-strip branch August 17, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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