Skip to content

fix(工作区): implicit next must not retarget via config.name fold - #62

Merged
Dandre126 merged 4 commits into
mainfrom
cursor/workspace-next-root-ads-6ba8
Aug 22, 2026
Merged

fix(工作区): implicit next must not retarget via config.name fold#62
Dandre126 merged 4 commits into
mainfrom
cursor/workspace-next-root-ads-6ba8

Conversation

@Dandre126

@Dandre126 Dandre126 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

P0 after re-board f62f00e4 (#59+#60+#61). New PR off main. No version bump.

Problem

Implicit / --root JSON next / briefing / repair ads were keyed by config.name via cli.py:_briefing_commandready_briefing.py:scoped_briefing_commandnext_step.py:repair_commands.

If that profile name uniquely fold-matched another registered alias (different root), next.commands became a working selector for the wrong workspace — including mutation_available: true and dyro --workspace <fold> bootstrap --yes.

needs_line already used _scoped_command--root when no alias is set. Repair / briefing did not. Fold-twin Demo/demo tests stayed green; this cross-workspace retarget was untested.

Fix

  • hub.py:workspace_alias_retargets_root / same_workspace_root — unique fold that resolves to another root is a retarget. Registry read failure also cannot prove --workspace stays on this root.
  • ready_briefing.py:scoped_briefing_command — collide or retarget or registry unread with config.root--root for the current workspace. Unregistered profile names stay path-free --workspace. Unique fold for the same root stays canonical.
  • cli.py:_timeout_repair_commands / _print_json_observation_timeout — after _config OSError/DyroError, never emit briefing_command(alias) (--workspace Demo). Unscoped dyro doctor if no verified root; --root only when this invocation already has one.
  • _inspect_worker.py:_unavailable_summary — pass root=record.root so the first-line doctor ad is not a bad --workspace Demo.
  • Isolated Console _workspace_ad / omit_colliding_workspace_command omit a --workspace doctor ad that would hit another root. Primary copy still does not invent doctor when the field is blank.
  • tests/support.py:WorkspaceCase isolates DYRO_HOME so path-free --root next ads are not flipped by a leftover test-workspace row from an earlier test.

#60 stays closed

  • Fold twins still fail-closed (including exact match).
  • Unique fold for explicit --workspace still canonical.
  • Console primary copy still does not invent --workspace … doctor when recommendation.command is blank.

Tests

  • Registry has workspace A (default, profile name X at root A) and another alias that uniquely fold-matches X at root B. Implicit and --root next must not advertise --workspace that targets B; must not advertise bootstrap/doctor against the other workspace.
  • Isolated --root Console card must not advertise that other-root selector.
  • Timeout fallback after _config fails: no fold-matching --workspace.
  • Registry-read failure → --root for this workspace, not other-workspace fold (including bootstrap --yes).
  • Unavailable summary with root omits the other-root --workspace doctor ad.
  • Existing fold-twin / unique-explicit / operator-copy / leftover-timeout tests remain.

CI

  • f1cf0ac Python 3.11–3.14 failed: leftover test-workspace in a shared registry flipped path-free ads to --root.
  • d84b742 required GitHub Actions is green.
  • 85daa59 required Actions failed: empty timeout repair broke the leftover JSON doctor envelope.
  • 09d3234 required GitHub Actions is green (Python 3.11–3.14, wheel/sdist, Windows/macOS smoke, TypeScript protocol). Local: ruff clean, 1089 unittest OK.
  • Vercel dyro / dyro-engineering-flow previews fail on this PR and on main after Resolve workspace aliases case-insensitively #60. Not required. This repo has no Vercel app; out of scope.

Leave unmerged.

Open in Web Open in Cursor 

Implicit and --root next/briefing/repair keyed ads by profile name. A
unique fold of that name to another registered alias produced a working
--workspace selector for the wrong root, including bootstrap --yes.

Advertise --root for the current workspace when the fold would resolve
elsewhere. Fold twins still fail-closed; explicit unique --workspace
stays canonical. Isolated Console omits a cross-root doctor ad.

Co-authored-by: Dandre Yang <[email protected]>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dyro Error Error Aug 22, 2026 10:48pm
dyro-engineering-flow Error Error Aug 22, 2026 10:48pm

Path-free --root next ads stay --workspace <profile> only when that
name is unregistered. A shared default registry from earlier tests
made the new retarget check flip those ads to --root. Each fixture
now gets its own DYRO_HOME.

Co-authored-by: Dandre Yang <[email protected]>
…e root

Timeout repair after _config fails no longer emits briefing_command(alias).
Registry read failure uses --root when config.root is known. Isolated
unavailable cards pass record.root so the first-line doctor ad cannot
select another workspace.

Co-authored-by: Dandre Yang <[email protected]>
After _config fails, keep a doctor repair so JSON next is not an empty
envelope. Do not attach --workspace; use --root only when this
invocation already has a known root.

Co-authored-by: Dandre Yang <[email protected]>
@Dandre126
Dandre126 merged commit 8d29ebe into main Aug 22, 2026
9 of 11 checks passed
@Dandre126
Dandre126 deleted the cursor/workspace-next-root-ads-6ba8 branch August 22, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants