Skip to content

test: align profile conformance with admitted action lifetime - #201273

Merged
vincentkoc merged 1 commit into
mainfrom
test/profile-role-admission-conformance-20261118
Nov 18, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test/profile-role-admission-conformance-20261118

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

PostgreSQL conformance still expected an already-admitted personal-profile action to lose authority when its role changed. That contradicts the admission-time role contract introduced in #201083 and fails five SQLite/PostgreSQL cases on scheduled main CI.

User Impact

No runtime behavior changes. The conformance suite now distinguishes admitted action continuity from role-reader revocation.

Why This Change Was Made

Update the existing action expectations and the persisted preference value after the allowed write. Keep the real COMMIT, rollback, lost-reply, pending/revoked/uncertain reader, and durable role checks intact.

Evidence

  • Failed scheduled job: https://github.com/openclaw/openclaw/actions/runs/44324200626/job/134871818343
  • Original five affected cases: 5 failed, reproducing the scheduled CI assertions through the normal PostgreSQL conformance entrypoint.
  • Candidate full file: 13 passed, 1 skipped (the PostgreSQL-only lost-reply case is intentionally skipped for SQLite).
  • Real isolated PostgreSQL 17.12 with pgvector, pg_trgm and unaccent; Node 24.22.1 and the repository-pinned Bun runtime on macOS. This is focused local conformance proof, not the full Linux shard.
  • Targeted format, typed lint and the owning infra test type graph passed.
  • Final committed-range local ClawSweeper review (e43b1461..9fe624c5): no actionable correctness or security findings; high confidence.

Related: #201083

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

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

@vincentkoc
vincentkoc marked this pull request as ready for review November 18, 2026 14:57
@vincentkoc
vincentkoc enabled auto-merge (squash) November 18, 2026 14:58
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Updates profile conformance expectations so admitted actions survive role changes while role readers remain fenced.

Example: An admitted action writes synthetic.authority=false after its profile role changes to member.

  • Before: The test expects an owner-changed rejection.
  • After: The test expects a successful write and reads back false.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and source-supported test repair with reported real-database results; hosted validation remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Only conformance tests change; the body reports real-database execution, and no shipped-entry-point demonstration is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Database conformance reports failures for behavior the admitted-action contract intentionally allows.
Reason: The maintainer-authored change follows an already merged owner decision and preserves independent authority-reader protections.

Merge readiness

✅ Ready for maintainer review

This PR correctly aligns existing conformance tests with the merged admission-time authority contract; no actionable patch defects were found.

Priority: P2
Reviewed head: 9fe624c53475c2f7b984a1093a6a86e4d09e8316

Before merge

None.

Findings

None.

Agent review details

How this fits together

The conformance suite exercises personal-profile admission, state-worker preference writes, and role-authority settlement across SQLite and PostgreSQL.

flowchart TD
  A[Personal profile admission] --> B[Retained identity binding]
  B --> C[Preference state worker]
  C --> D[SQLite or PostgreSQL]
  E[Profile role mutation] --> D
  D --> F[Role authority readers]
  F --> G[Pending revoked or uncertain status]
Loading

Technical review

Best possible solution:

Keep the focused expectation update and preserve the independent role-reader settlement checks.

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

Current-main tests still expect role changes to invalidate an action whose production guard now binds identity only; the PR reports matching failures, but no tests were run in this review.

Is this the best way to solve the issue?

This is the smallest complete repair: update the obsolete expectations using existing fixtures and retain the distinct commit, rollback, uncertain-outcome, and reader contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Personal-action and role-reader conformance expectations changes intended behavior with a stated reason (3d4a0d1: Protect staged authority at physical COMMIT, confirmed rollback, and uncertain PostgreSQL outcomes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 3d4a0d1 adds src/infra/database-engine/profile-authority.conformance.test.ts:113 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3d4a0d1bc1f6; files: src/infra/database-engine/profile-authority.conformance.test.ts)
  • Ayaan Zaidi: Raw commit 461319f adds src/gateway/server-methods/personal-profile-authorization.ts:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 461319f60bdc; files: src/gateway/server-methods/personal-profile-authorization.ts)

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 6 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 6 0

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 P2: Repairs obsolete database conformance expectations without changing runtime behavior.
  • 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: Repairs obsolete database conformance expectations without changing runtime behavior.
  • 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.

Reviewed November 18, 2026, 10:11 AM ET / 15:11 UTC.

@vincentkoc
vincentkoc merged commit 05d1e6f into main Nov 18, 2026
243 of 245 checks passed
@vincentkoc
vincentkoc deleted the test/profile-role-admission-conformance-20261118 branch November 18, 2026 15:22
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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