Skip to content

fix: accept mixed-case publication slugs - #1100

Merged
steipete merged 2 commits into
mainfrom
steipete/fix-mixed-case-publication-slugs
Aug 10, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/fix-mixed-case-publication-slugs

Conversation

@steipete

@steipete steipete commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • compare GitHub repository slugs case-insensitively at both direct-publication Worker containment boundaries while canonicalizing accepted record paths and storage slugs to lowercase
  • preserve original GitHub target/fence casing and error input while converging canonical records, export rows, tuple receipts, and direct-publication receipts on one lowercase record namespace
  • apply the same repository-only normalization to decision-packet path and subject validation on the Worker and client mirror
  • add focused regression coverage plus a real local Wrangler/Durable Object HTTP and persisted-SQLite proof

Validation

  • pnpm run build:all
  • pnpm run test:no-build — 3,274 tests; 3,265 passed, 9 skipped, 0 failed
  • pnpm run lint
  • pnpm run format:check
  • pnpm run check:dashboard-queue-boundary
  • pre-commit and committed-branch autoreview: clean, no accepted/actionable findings

pr-behavior-proof

  • Claim: A signed direct-publication plan for steipete/CodexBar#2516 with an uppercase records/steipete-CodexBar/... operation is accepted but persisted and served only from records/steipete-codexbar/...; a truly different repository remains rejected, and an all-lowercase repository remains byte-identical.
  • Exercised surface: Built dashboard Worker, signed /internal/exact-review/publication-results and /internal/state/records/export HTTP routes, the real ExactReviewQueue Durable Object with local Wrangler persistence, and its persisted canonical, export-index, and publication-receipt SQLite rows.
  • Scenario/fixture: The harness boots the Worker, instantiates the Durable Object, stops the full Wrangler process tree, asserts the direct-publication table in persisted SQLite, seeds disposable pending fences, reboots, and sends uppercase-path, different-repository, and lowercase signed plans. It exports both lowercase and uppercase namespaces through the Worker, stops Wrangler, then inspects persisted SQLite.
  • Command/environment: Node 24 on macOS with MIXED_CASE_PUBLICATION_SLUGS_PROOF_OUTPUT=<temp-dir> bash docs/proof/mixed-case-publication-slugs/run-proof.sh; then fresh PR head ff1c1c7432a6341b6117afba405caed39e2b9da5 in Crabbox provider=local-container, image node:24-bookworm, lease cbx_10e79c7cd9e6, using bash docs/proof/mixed-case-publication-slugs/run-proof.sh.
  • Observable result: The uppercase-path plan returned HTTP 202 with accepted=true; lowercase export returned one item with content x; uppercase export returned zero records; persisted SQLite contained 3 lowercase canonical rows, 3 lowercase export rows, zero uppercase canonical/export rows, and receipt path records/steipete-codexbar/items/2516.md. The different repository returned HTTP 400 invalid_direct_publication_plan with the original-case detail direct publication path is outside steipete-CodexBar#2517: records/steipete-other/items/2517.md; the all-lowercase plan returned HTTP 202 with accepted=true.
  • Artifact/trace: docs/proof/mixed-case-publication-slugs/ contains the reusable harness and contract. The disposable local artifact directory captured signed requests/responses, both export responses, a runtime transcript, namespace-storage JSON, build/install logs, and a redacted Wrangler log. The container run reported PROOF_RC=0 and leaseStopped=true.
  • Limits: Local Wrangler and the Docker-backed fresh-PR container prove the built Worker/DO path without production mutation, production Cloudflare deployment, or replaying live dead letters.

OpenClaw Bay impact

No Bay change is needed. This only normalizes repository-name casing at internal publication validation and persistence boundaries; it does not change observer data, status projections, or any Bay control surface.

Aftermath

The roughly 191 tuple_protocol_invalid dead letters are all fresh_recovery.eligible. After this deploys, the scheduled dead-letter reconciler will re-run them and they should publish without manual replay. The CodexBar re-review loop stops once those publications finally persist.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 12:39 PM ET / 16:39 UTC.

ClawSweeper review

What this changes

The PR accepts repository-name case differences in direct publication and repair tuple validation while persisting canonical records, export rows, and receipts under lowercase slugs.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open for normal landing review. The current head resolves the earlier storage-namespace blocker: mixed-case input is accepted only after repository containment, then rewritten to the lowercase durable namespace; no blocking correctness or security issue remains.

Priority: P2
Reviewed head: ff1c1c7432a6341b6117afba405caed39e2b9da5

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The repaired branch has strong real-path proof, targeted regression coverage, and no remaining blocking finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix local Wrangler/Durable Object HTTP and persisted-SQLite evidence from the current head in Crabbox, with observed acceptance, canonical storage, and rejection results.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix local Wrangler/Durable Object HTTP and persisted-SQLite evidence from the current head in Crabbox, with observed acceptance, canonical storage, and rejection results.
Evidence reviewed 6 items Current-main behavior: Current main still requires an exact lowercase path match, so an uppercase repository slug is rejected before publication; the PR remains necessary.
Prior P1 is fixed at the durable boundary: The updated validator compares only repository casing, constructs a lowercase storage path, and replaces the operation slug before it reaches storage.
Namespace and containment coverage: Focused tests assert lowercase reads and zero uppercase rows, retry deduplication, and rejection of a genuinely different repository.
Findings None None.
Security None None.

How this fits together

The dashboard Worker validates signed publication plans before the Durable Object stores canonical review records and serves exports. Repair tuple validation performs equivalent path and subject checks before records reach that same storage boundary.

flowchart LR
  A[Signed publication plan] --> B[Worker containment validation]
  B --> C[Repository case comparison]
  C --> D[Lowercase canonical record path]
  D --> E[Durable Object storage]
  E --> F[Record export]
  G[Repair decision packet] --> H[Tuple validation]
  H --> C
Loading

Before merge

  • Resolve merge risk (P1) - This intentionally changes compatibility semantics: signed operations that differ only by repository-letter case will be accepted and converge on the lowercase namespace rather than returning HTTP 400.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch surface 9 files, +800 / -66 lines The change combines two validation boundaries with reusable proof coverage, so the broader-than-usual proof footprint merits review visibility.
Code and proof split production +98 / -27, tests +265 / -39, proof/docs +437 Most growth is regression and real-behavior proof rather than durable runtime code.

Merge-risk options

Maintainer options:

  1. Land canonical case handling (recommended)
    Accept the intentional compatibility change because the branch preserves lowercase storage and rejects paths for a different repository.
  2. Pause for caller rollout review
    Pause only if operators need to audit an external caller that intentionally relies on the former mixed-case rejection.

Technical review

Best possible solution:

Land the lowercase canonicalization with the existing containment checks and retain the focused Worker, tuple, and persisted-storage regression coverage.

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

Yes—current-main coverage constructs the mixed-case path and asserts the Worker returns HTTP 400, while the PR changes that exact path to acceptance and lowercase persistence.

Is this the best way to solve the issue?

Yes—the branch fixes both direct and tuple validation at their storage boundaries, preserves rejection for distinct repositories, and covers lower-case compatibility.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded repair to internal publication handling with meaningful but non-emergency operational impact.
  • merge-risk: 🚨 compatibility: The PR deliberately changes prior rejection behavior for case-only repository-path differences.
  • 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 (live_output): The PR body supplies after-fix local Wrangler/Durable Object HTTP and persisted-SQLite evidence from the current head in Crabbox, with observed acceptance, canonical storage, and rejection results.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix local Wrangler/Durable Object HTTP and persisted-SQLite evidence from the current head in Crabbox, with observed acceptance, canonical storage, and rejection results.

Evidence

What I checked:

Likely related people:

  • Martin Cleary: Introduced current-main publication slug normalization and retry-containment work in the central Worker module. (role: recent publication-area contributor; confidence: high; commits: 50f90eac14f7; files: dashboard/exact-review-direct-publication.ts)
  • Vincent Koc: Appears in the available history for the direct-publication path and related reconciliation behavior. (role: adjacent publication contributor; confidence: medium; commits: 6976512bc0fe; files: dashboard/exact-review-direct-publication.ts)

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 (1 earlier review cycle)
  • reviewed 2026-08-10T16:15:15.781Z sha 4f13f7f :: needs changes before merge. :: [P1] Keep accepted record slugs lowercase before durable writes

@clawsweeper clawsweeper Bot added 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 10, 2026
@steipete
steipete merged commit 86f03fb into main Aug 10, 2026
19 checks passed
@steipete
steipete deleted the steipete/fix-mixed-case-publication-slugs branch August 10, 2026 16:43
steipete added a commit that referenced this pull request Aug 13, 2026
…sede proven-stale tuple rows (#1152)

Root-causes and fixes the tuple_protocol_invalid dead-letter class (30 rows), closing the DLQ's last unexplained residue.

Fingerprint archaeology: the dominant 21-row class hashed to a generic invalid_direct_publication_plan opacity bucket - 19 rows are debris of the mixed-case slug bug already fixed in #1100 (steipete/CodexBar targets), two lost their pre-#1091 detail and stay honestly unclassified. The live 4-row class is "conflicting direct publication retry": guarded apply refreshes current_item_*/apply_checked_at after canonical acceptance, so publication retries see byte-conflicts against their own accepted plan (hit both pre- and post-#1143 items, including re_review command results - NOT a protocol-v2 command bug).

Live fix: an actively owned batch resumes from its terminal canonical receipt instead of conflicting with itself; strict direct-publication conflict and fence checks preserved. Stale tuple rows now pass through the #1148 six-way evidence-gated supersede (newer-head completed record required); current-head rows stay recoverable so they republish after this fix; workflow_cancelled remains excluded.

Proof: red reproduced the HTTP 400 conflict and the supersede exclusion; green 176/176 focused scenarios; full gate 3396/0; Crabbox local-container receipt at this head (docs/proof/tuple-protocol-rootcause/). Verdict clean (Findings: None, Security: None) on 5b67ae2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. 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