Skip to content

fix: retire obsolete Activity privacy-denial test - #197058

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
retire-obsolete-activity-denial
Nov 11, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
retire-obsolete-activity-denial

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Activity browser CI timing out while expecting a privacy denial that the sessions API no longer returns.

User Impact

No product behavior changes. The current readable-session filtering contract remains covered, along with browser permission-error retention, Retry and revocation.

Why This Change Was Made

#196446 removed the blanket foreign-person denial in favor of filtering readable sessions. #196939 subsequently added a real-Gateway scenario that still expects the removed error. The real request correctly succeeds, so the scenario cannot reach its alert assertion.

Retire that obsolete scenario and reduce its test allocation by exactly 193 lines (462→269). Keep the existing browser denial lifecycle tests and Gateway visibility tests unchanged. Shared test-budget scalar is unchanged.

Evidence

  • Before: actual failing CI leaf, checkout f046bfe685dfc63fa12b641058fe5fcf47afd2ef (main parent 0d0ab362b22573ce6558b03b1b09631b40407059), times out at the obsolete alert wait. The real guest reached Activity and sessions.list returned success. Exact-checkout local reproduction fails at the same assertion;105.78s including cold compilation,10s local locator bound versus30s in CI.
  • Retained browser denial/Retry/revocation scenario:1/1 passed,16.45s. Activity controller/readiness:23/23 passed,6.02s. Real SQLite-backed Gateway visibility owner:10/10 passed,76.94s, including foreign/hidden/sessionless selectors and role caps.
  • Native test budget:6,651,947 /6,651,957,slack10;193 removed test lines match the allocation reduction. Diff whitespace check passes; no remaining references to the removed filename.
  • Initial Gateway-owner attempt aborted during local disk exhaustion and is not passing proof; the recovered run above passed. An additional guest-owner browser fixture was refused before tests by the managed-Gateway artifact-separation guard; no override was used.

Simplification: remove one unsupported193-line transport scenario and its exact budget credit.

@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR deletes the obsolete real-Gateway Activity denial scenario and reduces its test allocation from 462 to 269 lines.

Example: A guest with sessions.others=view opens Activity for the sessionless synthetic profile Other Person.

  • Before: The Gateway returns a successful filtered result, but the test waits for a privacy-denial alert and times out.
  • After: The unsupported scenario is retired while readable-session filtering and denial lifecycle tests remain.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified test retirement with preserved contract coverage and no actionable findings; reported execution results were not independently rerun.
Proof confidence 🐚 platinum hermit (4/6) This test-only removal changes no shipped behavior; the body reports retained browser and SQLite-backed Gateway checks, and inspected linked screenshots provide historical context rather than proof of this deletion.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Browser CI waits for an error that successful readable-session filtering no longer returns.
Reason: The change aligns test expectations with an explicitly accepted product contract without altering runtime behavior or weakening retained supported assertions.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes an obsolete test expectation that contradicts the merged readable-session contract, preserves relevant coverage, and introduces no actionable defect.

Priority: P2
Reviewed head: 0686dba98454eb5cae54beba815bef0951da3a8b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Activity sends person-scoped sessions.list requests to the Gateway, which filters readable sessions; browser tests separately exercise permission feedback and recovery.

flowchart LR
  A[Activity person selection] --> B[Activity query owner]
  B --> C[Gateway sessions list]
  C --> D[Readable session filtering]
  D --> E[Activity rows or empty result]
  F[Retained browser regression] --> G[Denial and Retry lifecycle]
Loading

Technical review

Best possible solution:

Retire the unreachable denial scenario and its exact allocation while retaining existing filtering and permission-lifecycle coverage.

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

Source establishes the mismatch: the deleted fixture waits for a blanket foreign-person denial that current main intentionally removed; this review ran no target code.

Is this the best way to solve the issue?

The deletion is the smallest complete fix because existing owner and browser suites preserve the supported filtering and denial lifecycle contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Real-Gateway denial scenario changes intended behavior with a stated reason (e51bb04: Prove denial feedback remains stable across unrelated session events and supports Retry.)
  • Per-change test allocation keeps the original intent (e51bb04: Allocate the original change's regression-test growth; removing the retired scenario's exact credit preserves that accounting.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -193, Other 0. Total -193 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 0 193 -193
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 2 2 195 -193

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: An obsolete browser expectation causes CI failure with a focused, behavior-preserving repair.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: An obsolete browser expectation causes CI failure with a focused, behavior-preserving repair.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 11, 2026, 12:58 AM ET / 05:58 UTC.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Merged via squash.

etzelm added a commit to etzelm/openclaw that referenced this pull request Nov 11, 2026
- Bring in openclaw#197058, which retires the ui-e2e scenario failing on main.
- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2645 -> 2646).
alkor2000 added a commit to alkor2000/openclaw that referenced this pull request Nov 11, 2026
Merge official main to include openclaw#197058 after openclaw#196446 replaced blanket
foreign Activity denial with readable-session filtering. Retain JSON
scalar protection and the existing clipboard/person-reference fixtures.

The old Skills CI failure remains unclassified; bounded current cases
pass without claiming an unsupported product fix.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
vincentkoc added a commit that referenced this pull request Nov 13, 2026
)

* feat(database): keep PostgreSQL rollback captures in PostgreSQL

- Exact update rollback and Doctor pre-migration captures copy the store into a frozen restore_<uuid> schema on the same server
- The copy runs in one REPEATABLE READ transaction: generated DDL, INSERT ... SELECT per table, sequences from captured allocations
- Manifest hashes come from a separate source read in the same snapshot and are checked against the copy
- The manifest keeps today's fields and adds carrier "postgres-schema" plus the schema name; only anchor.sqlite and manifest.json are written locally
- Restore copies the frozen schema into a fresh namespace and checks the manifest hashes, so the capture survives a failed or repeated rollback
- Verified update retirement drops capture schemas through the restore namespace guard before removing the snapshot directory
- Capture schemas carry a comment naming their directory; before each pre-migration capture, Doctor drops this store's captures whose directory was removed
- The portable SQLite export stays the default for archives, ports, repairs and the candidate state copy; the shared state family keeps it for client credential rollback
- inspectRestorableDatabaseFiles and readPostgresPortCapabilities move unchanged to their own modules to stay under the line cap

* fix(database): resolve CI failures for PostgreSQL schema captures

- Doctor's PostgreSQL capture no longer writes database.sqlite; the client credential Doctor test reads the captured token from the capture schema and drops it on cleanup
- Rename the worker-side prune to pruneOrphanedPostgresCaptures so prunePostgresSchemaCaptures has one exported spelling (export-name-collisions)
- Set the test-lines allocation to the CI-counted net delta (384)

* feat(database): make PostgreSQL server recovery captures opt-in

- Add database.postgres.recoveryCaptures ("portable" default, "server")
- Update and Doctor captures use restore_<uuid> schemas only when "server"
- Doctor still prunes orphaned capture schemas regardless of the setting
- Shared state family and candidate state copy stay portable
- Document the server carrier trade-offs in database-engines.md
- Raise core config baseline 2638 -> 2639 for the new setting
- Raise test-lines allocation 384 -> 421 for the opt-in tests

* fix(database): prune only capture schemas this role can drop

- Restrict Doctor capture pruning to schemas the runtime role can use (pg_has_role USAGE)
- Another role's marked restore_ schema under the same path no longer fails Doctor
- Test two isolated roles with one directory prefix; fails without the fix
- Raise test-lines allocation 421 -> 466 for the new test

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2641 -> 2642).

* test(database): raise schema capture test-line allocation to 469

- Net test lines of this change against current main are +469 (was 466 against the old base).

* docs(database): note original state captures stay portable

- Server recovery captures cover update rollback and Doctor pre-migration captures only.

- Original state captures before an update or standalone doctor --fix still write SQLite images of PostgreSQL stores.

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2645 -> 2646).

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.sha256 by regenerating with pnpm config:docs:gen (counts unchanged, core 2646).

* Merge origin/main into feat/postgres-native-captures

- Bring in #197058, which retires the ui-e2e scenario failing on main.
- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2645 -> 2646).

* Merge origin/main into feat/postgres-native-captures

- Resolve src/infra/update-database-backup.ts: keep inspectRestorableDatabaseFiles in update-database-backup-files.ts (moved by this PR for the max-lines cap) and carry main #197277 sidecar lstat change into it; keep main engine-reuse changes.

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2647 -> 2648).

* fix(database): commit recovery capture metadata atomically

Write the cleanup marker through the existing post-data renderer so it commits with the copied schema. Preserve owner-specific DDL and keep ordinary restores unmarked.

Release note: keep PostgreSQL recovery captures discoverable after a client interruption at COMMIT.

Validation: the unchanged parent loses its marker after a real client SIGKILL; the fixed PostgreSQL 17.11 capture module passes all eight cases. Targeted lint, formatting, and independent P0-P2 correction review pass. Missing public.unaccent was reproduced on the parent and corrected through documented test-server initialization.

* fix(snapshot): keep capture custody paths private

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 5211f64faa02cea25424c18dc6bcc3512926c76f

* fix(config): regenerate capture recovery baseline

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…claw#196236)

* feat(database): keep PostgreSQL rollback captures in PostgreSQL

- Exact update rollback and Doctor pre-migration captures copy the store into a frozen restore_<uuid> schema on the same server
- The copy runs in one REPEATABLE READ transaction: generated DDL, INSERT ... SELECT per table, sequences from captured allocations
- Manifest hashes come from a separate source read in the same snapshot and are checked against the copy
- The manifest keeps today's fields and adds carrier "postgres-schema" plus the schema name; only anchor.sqlite and manifest.json are written locally
- Restore copies the frozen schema into a fresh namespace and checks the manifest hashes, so the capture survives a failed or repeated rollback
- Verified update retirement drops capture schemas through the restore namespace guard before removing the snapshot directory
- Capture schemas carry a comment naming their directory; before each pre-migration capture, Doctor drops this store's captures whose directory was removed
- The portable SQLite export stays the default for archives, ports, repairs and the candidate state copy; the shared state family keeps it for client credential rollback
- inspectRestorableDatabaseFiles and readPostgresPortCapabilities move unchanged to their own modules to stay under the line cap

* fix(database): resolve CI failures for PostgreSQL schema captures

- Doctor's PostgreSQL capture no longer writes database.sqlite; the client credential Doctor test reads the captured token from the capture schema and drops it on cleanup
- Rename the worker-side prune to pruneOrphanedPostgresCaptures so prunePostgresSchemaCaptures has one exported spelling (export-name-collisions)
- Set the test-lines allocation to the CI-counted net delta (384)

* feat(database): make PostgreSQL server recovery captures opt-in

- Add database.postgres.recoveryCaptures ("portable" default, "server")
- Update and Doctor captures use restore_<uuid> schemas only when "server"
- Doctor still prunes orphaned capture schemas regardless of the setting
- Shared state family and candidate state copy stay portable
- Document the server carrier trade-offs in database-engines.md
- Raise core config baseline 2638 -> 2639 for the new setting
- Raise test-lines allocation 384 -> 421 for the opt-in tests

* fix(database): prune only capture schemas this role can drop

- Restrict Doctor capture pruning to schemas the runtime role can use (pg_has_role USAGE)
- Another role's marked restore_ schema under the same path no longer fails Doctor
- Test two isolated roles with one directory prefix; fails without the fix
- Raise test-lines allocation 421 -> 466 for the new test

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2641 -> 2642).

* test(database): raise schema capture test-line allocation to 469

- Net test lines of this change against current main are +469 (was 466 against the old base).

* docs(database): note original state captures stay portable

- Server recovery captures cover update rollback and Doctor pre-migration captures only.

- Original state captures before an update or standalone doctor --fix still write SQLite images of PostgreSQL stores.

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2645 -> 2646).

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.sha256 by regenerating with pnpm config:docs:gen (counts unchanged, core 2646).

* Merge origin/main into feat/postgres-native-captures

- Bring in openclaw#197058, which retires the ui-e2e scenario failing on main.
- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2645 -> 2646).

* Merge origin/main into feat/postgres-native-captures

- Resolve src/infra/update-database-backup.ts: keep inspectRestorableDatabaseFiles in update-database-backup-files.ts (moved by this PR for the max-lines cap) and carry main openclaw#197277 sidecar lstat change into it; keep main engine-reuse changes.

* Merge origin/main into feat/postgres-native-captures

- Resolve docs/.generated/config-baseline.{counts.json,sha256} by regenerating with pnpm config:docs:gen (core 2647 -> 2648).

* fix(database): commit recovery capture metadata atomically

Write the cleanup marker through the existing post-data renderer so it commits with the copied schema. Preserve owner-specific DDL and keep ordinary restores unmarked.

Release note: keep PostgreSQL recovery captures discoverable after a client interruption at COMMIT.

Validation: the unchanged parent loses its marker after a real client SIGKILL; the fixed PostgreSQL 17.11 capture module passes all eight cases. Targeted lint, formatting, and independent P0-P2 correction review pass. Missing public.unaccent was reproduced on the parent and corrected through documented test-server initialization.

* fix(snapshot): keep capture custody paths private

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 5211f64faa02cea25424c18dc6bcc3512926c76f

* fix(config): regenerate capture recovery baseline

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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