Skip to content

test(ui): forbid new controller host consumers - #174446

Merged
steipete merged 1 commit into
mainfrom
solid2/w-idiom3-controller-guard
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-idiom3-controller-guard

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI controller guard only starts rejecting controller patterns after every production controller has disappeared. Until then, a new module can import the legacy Solid controller host and expand the migration surface.

User Impact

No runtime or visual change. The guard rejects new production modules that import the controller host while allowing existing consumers to be migrated independently.

Why This Change Was Made

Compare actual static imports, re-exports, dynamic imports, and import types against the selected Git base. Parse syntax so comments and ordinary string examples do not count. Keep test fixtures excluded and preserve the existing staged/base behavior. There is no new allowlist.

Evidence

Check Result
Controller guard suite 3 tests passed; includes imports, re-exports, literal-template imports, import types, fixture exclusions, and staged/base entry points
Guard on current checkout Passed against the branch base
Formatting / diff check Passed
Independent review Addressed literal-template coverage finding; focused tests pass
Runtime / startup Unchanged; tooling-only change

The first test run caught a wrong traversal API call before commit; it now uses the native parser's node traversal. The accepted review finding added the literal-template case. No existing controller consumers or runtime checks are weakened.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T16:50:47.249114Z ac410cf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Oct 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac410cf8d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +58 to +60
const previousHostUsers = controllerHostUsers(root, previous);
const newHostUsers = [...controllerHostUsers(root, current)].filter(
(file) => !previousHostUsers.has(file),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve verified renames in the host-user ratchet

When an existing controller-host consumer is renamed or moved without changing its dependency, the current file path is absent from previousHostUsers, so this guard rejects the change as a new consumer even though the migration surface did not grow. This will block ordinary refactors of any grandfathered consumer; account for Git-verified renames when comparing the two sets, while continuing to reject copies and genuinely new imports.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

The PR rejects new production modules importing the retiring controller host while preserving existing consumers and test exclusions.

Example: Add ui/src/new.ts importing ./lib/reactive/solid-controller-host.ts while production controllers remain.

  • Before: The controller guard accepts the new dependency.
  • After: The guard names ui/src/new.ts and exits with status 1.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused tests exercise the actual guard, but the confirmed rename regression blocks merging.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling PR is outside the ordinary contributor proof gate; its body reports focused guard tests and a successful checkout guard run, while the added test exercises rejection through the real in-process guard.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Contributors can expand legacy controller-host dependencies before the existing retirement gate becomes active, increasing future migration work.
Reason: The maintainer-authored direction strengthens the existing retirement owner without runtime changes, new configuration, or another baseline.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: the guard is useful and absent from current main, but its path comparison incorrectly rejects moves of existing consumers.

Priority: P2
Reviewed head: ac410cf8d96ee99c36fbf8e96e4caca731e4b7c4

Before merge

  • Preserve existing consumers across Git-verified renames (P2) - Renaming ui/src/components/assistant-panel-solid.tsx to another filename in the same directory preserves its host dependency, but the destination fails previousHostUsers.has(file). The guard consequently reports a new consumer and fails lint even though the migration surface has not grown. Transfer the existing allowance through listRatchetRenames for the selected base and staged mode, while rejecting copies and genuinely new consumers.

Findings

  • [P2] Preserve existing consumers across Git-verified renames — scripts/check-control-ui-controllers.mts:58-60

Tests

  • Missing end-to-end proof: The added coverage omits unchanged consumer renames in working-tree and staged modes, including the negative control that copies remain rejected.
Agent review details

How this fits together

The repository lint pipeline passes Git base and staged settings into the controller guard, which reads UI source snapshots and reports prohibited dependencies.

flowchart TD
  A[Lint entry point] --> B[Controller guard]
  C[Git base sources] --> B
  D[Current or staged sources] --> B
  B --> E[Syntax parsed host consumers]
  E --> F[Dependency comparison]
  F --> G[Diagnostics and exit status]
Loading

Technical review

Best possible solution:

Preserve grandfathered consumers across Git-verified renames while continuing to reject copies and genuinely new host dependencies.

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

Source establishes the failure: rename ui/src/components/assistant-panel-solid.tsx within its directory without changing its import, and the destination is absent from the base consumer set, causing exit 1; no execution was performed.

Is this the best way to solve the issue?

Syntax-based dependency detection appropriately extends the existing guard, but consumer identity must account for verified moves using the existing shared rename helper.

Full review comments:

  • [P2] Preserve existing consumers across Git-verified renames — scripts/check-control-ui-controllers.mts:58-60
    Renaming ui/src/components/assistant-panel-solid.tsx to another filename in the same directory preserves its host dependency, but the destination fails previousHostUsers.has(file). The guard consequently reports a new consumer and fails lint even though the migration surface has not grown. Transfer the existing allowance through listRatchetRenames for the selected base and staged mode, while rejecting copies and genuinely new consumers.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Controller retirement enforcement changes intended behavior with a stated reason (b62a8f8: The earlier listener-lifetime refactor deliberately allowed controller growth until production retirement, then rejected reintroductions; the later infrastructure cleanup preserved that guard.)
  • Independent controller guard and test entry points keeps the original intent (399b740: Retiring Lit migration infrastructure retained an independent controller-retirement guard and its staged/base lint behavior.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test test/scripts/check-control-ui-controllers.test.ts --maxWorkers=1
  • node scripts/check-changed.mjs --dry-run -- scripts/check-control-ui-controllers.mts test/scripts/check-control-ui-controllers.test.ts
  • node scripts/check-changed.mjs -- scripts/check-control-ui-controllers.mts test/scripts/check-control-ui-controllers.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 399b740 adds scripts/check-control-ui-controllers.mts:34 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 399b740ce041; files: scripts/check-control-ui-controllers.mts)

PR surface

Tests +25, Other +41. Total +66 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 25 0 +25
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 41 0 +41
Total 2 66 0 +66

Labels

Label changes:

  • add P2: The introduced false rejection blocks ordinary UI consumer moves through the lint pipeline, with a focused repair available.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The introduced false rejection blocks ordinary UI consumer moves through the lint pipeline, with a focused repair available.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 October 16, 2026, 1:02 PM ET / 17:02 UTC.

@steipete
steipete merged commit 3555a65 into main Oct 16, 2026
109 of 111 checks passed
@steipete
steipete deleted the solid2/w-idiom3-controller-guard branch October 16, 2026 17:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Oct 16, 2026
…158510

* commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits)
  feat(decisions): run typed tasks with prepared model credentials (#157225)
  fix(gateway): retain observer slots until model work settles (#174262)
  refactor(ui): own assistant content subscriptions in Solid (#174035)
  refactor(logging): remove package and snapshot debug instrumentation (#174431)
  fix: show native Talk speech separately from completed answers (#172598)
  test(ui): forbid new controller host consumers (#174446)
  chore(deps): refresh dependencies with a seven-day cutoff (#174410)
  perf(ui): reduce idle native session catalog polling (#174404)
  refactor(test): remove unused Signal fixture overrides (#174445)
  fix: surface DNS zone and Linux camera read failures (#174424)
  fix(doctor): keep at most three standalone Doctor captures (#174415)
  perf(cron): reuse session writer for completed run alias cleanup (#174413)
  feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399)
  perf(channels): avoid rereading ingress queue mutations (#174393)
  feat(control-ui): keep link readers scoped to their pane session (#173652)
  test(ui): wait for desktop widget placement before pinning (#174439)
  refactor(ui): compose remaining plugin classes (#174441)
  perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690)
  fix(sessions): quietly settle archived delivery endpoints (#174442)
  perf(sessions): keep config loading out of transcript workers (#174414)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…esafe-decision-native

* commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits)
  feat(decisions): run typed tasks with prepared model credentials (#157225)
  fix(gateway): retain observer slots until model work settles (#174262)
  refactor(ui): own assistant content subscriptions in Solid (#174035)
  refactor(logging): remove package and snapshot debug instrumentation (#174431)
  fix: show native Talk speech separately from completed answers (#172598)
  test(ui): forbid new controller host consumers (#174446)
  chore(deps): refresh dependencies with a seven-day cutoff (#174410)
  perf(ui): reduce idle native session catalog polling (#174404)
  refactor(test): remove unused Signal fixture overrides (#174445)
  fix: surface DNS zone and Linux camera read failures (#174424)
  fix(doctor): keep at most three standalone Doctor captures (#174415)
  perf(cron): reuse session writer for completed run alias cleanup (#174413)
  feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399)
  perf(channels): avoid rereading ingress queue mutations (#174393)
  feat(control-ui): keep link readers scoped to their pane session (#173652)
  test(ui): wait for desktop widget placement before pinning (#174439)
  refactor(ui): compose remaining plugin classes (#174441)
  perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690)
  fix(sessions): quietly settle archived delivery endpoints (#174442)
  perf(sessions): keep config loading out of transcript workers (#174414)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…/decision-tool-v2-proof-20261016

* commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits)
  feat(decisions): run typed tasks with prepared model credentials (#157225)
  fix(gateway): retain observer slots until model work settles (#174262)
  refactor(ui): own assistant content subscriptions in Solid (#174035)
  refactor(logging): remove package and snapshot debug instrumentation (#174431)
  fix: show native Talk speech separately from completed answers (#172598)
  test(ui): forbid new controller host consumers (#174446)
  chore(deps): refresh dependencies with a seven-day cutoff (#174410)
  perf(ui): reduce idle native session catalog polling (#174404)
  refactor(test): remove unused Signal fixture overrides (#174445)
  fix: surface DNS zone and Linux camera read failures (#174424)
  fix(doctor): keep at most three standalone Doctor captures (#174415)
  perf(cron): reuse session writer for completed run alias cleanup (#174413)
  feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399)
  perf(channels): avoid rereading ingress queue mutations (#174393)
  feat(control-ui): keep link readers scoped to their pane session (#173652)
  test(ui): wait for desktop widget placement before pinning (#174439)
  refactor(ui): compose remaining plugin classes (#174441)
  perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690)
  fix(sessions): quietly settle archived delivery endpoints (#174442)
  perf(sessions): keep config loading out of transcript workers (#174414)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…157433

* commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits)
  feat(decisions): run typed tasks with prepared model credentials (#157225)
  fix(gateway): retain observer slots until model work settles (#174262)
  refactor(ui): own assistant content subscriptions in Solid (#174035)
  refactor(logging): remove package and snapshot debug instrumentation (#174431)
  fix: show native Talk speech separately from completed answers (#172598)
  test(ui): forbid new controller host consumers (#174446)
  chore(deps): refresh dependencies with a seven-day cutoff (#174410)
  perf(ui): reduce idle native session catalog polling (#174404)
  refactor(test): remove unused Signal fixture overrides (#174445)
  fix: surface DNS zone and Linux camera read failures (#174424)
  fix(doctor): keep at most three standalone Doctor captures (#174415)
  perf(cron): reuse session writer for completed run alias cleanup (#174413)
  feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399)
  perf(channels): avoid rereading ingress queue mutations (#174393)
  feat(control-ui): keep link readers scoped to their pane session (#173652)
  test(ui): wait for desktop widget placement before pinning (#174439)
  refactor(ui): compose remaining plugin classes (#174441)
  perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690)
  fix(sessions): quietly settle archived delivery endpoints (#174442)
  perf(sessions): keep config loading out of transcript workers (#174414)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…/decision-onnx-v2-proof-20261016

* commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits)
  feat(decisions): run typed tasks with prepared model credentials (#157225)
  fix(gateway): retain observer slots until model work settles (#174262)
  refactor(ui): own assistant content subscriptions in Solid (#174035)
  refactor(logging): remove package and snapshot debug instrumentation (#174431)
  fix: show native Talk speech separately from completed answers (#172598)
  test(ui): forbid new controller host consumers (#174446)
  chore(deps): refresh dependencies with a seven-day cutoff (#174410)
  perf(ui): reduce idle native session catalog polling (#174404)
  refactor(test): remove unused Signal fixture overrides (#174445)
  fix: surface DNS zone and Linux camera read failures (#174424)
  fix(doctor): keep at most three standalone Doctor captures (#174415)
  perf(cron): reuse session writer for completed run alias cleanup (#174413)
  feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399)
  perf(channels): avoid rereading ingress queue mutations (#174393)
  feat(control-ui): keep link readers scoped to their pane session (#173652)
  test(ui): wait for desktop widget placement before pinning (#174439)
  refactor(ui): compose remaining plugin classes (#174441)
  perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690)
  fix(sessions): quietly settle archived delivery endpoints (#174442)
  perf(sessions): keep config loading out of transcript workers (#174414)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant