Skip to content

Add guided simbroker setup - #19

Open
VladimirBrejcha wants to merge 22 commits into
mainfrom
codex/guided-setup
Open

Add guided simbroker setup#19
VladimirBrejcha wants to merge 22 commits into
mainfrom
codex/guided-setup

Conversation

@VladimirBrejcha

Copy link
Copy Markdown
Contributor

Summary

  • add one guided simbroker setup flow for machine prerequisites, runtime selection, six-device planning, confirmation, provisioning, service startup, snapshot refresh, and health verification
  • share the same versioned preview/apply contract with the macOS app, including blocked, cancellation, partial-failure, and ready states
  • make new project scaffolds version-agnostic unless --ios-version is explicitly supplied
  • update onboarding documentation, specifications, Homebrew metadata, examples, and install/package smoke coverage

Safety and recovery

  • confirmation is bound to a deterministic plan ID and revalidated under the existing global lock order before mutation
  • setup strictly reuses only exact device matches and rolls back only devices created before host configuration commits
  • existing healthy hosts are preserved; invalid or unhealthy hosts are diagnosed without forced replacement or lease/pin mutation
  • repeated and concurrent setup runs do not create duplicate managed devices

Verification

  • npm run test:broker-core — 254 passed
  • npm run test:client — 186 passed
  • npm run test:docs — 19 passed
  • npm run test:harness-adoption — 24 passed
  • npm run test:app — 84 passed
  • npm run test:install-smoke
  • npm run test:package-smoke
  • npm run verify:public-surface
  • ./script/build_and_run.sh --verify
  • required implementation and spec-only agent verification profiles
  • deterministic macOS visual review for light, dark, blocked, tight-sheet, and ready states

Specification

The implemented contract is documented in spec/tasks/guided-simbroker-setup.md (GSB-SETUP-001).

Why:
Make first-time machine setup safe, obvious, idempotent, and shared by the CLI and macOS app.

Changed:
Add deterministic setup preview/apply planning, prerequisite checks, six-device provisioning, service and health completion, app confirmation UI, portable project defaults, documentation, smoke coverage, and active specifications.

Verification:
Passed implementation and spec-only harness profiles, broker-core, client, docs, harness-adoption, app, install smoke, package smoke, public-surface, and macOS build verification.

Affected:
broker-core, client, app, docs, specs, examples, packaging, Homebrew metadata, and install smoke.

Refs:
GSB-SETUP-001

Session:
task-sessions/guided-setup
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: deb89d5e5c

ℹ️ 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 thread client/bin/simbroker.mjs Outdated
Comment thread broker-core/index.mjs Outdated
Comment thread client/bin/simbroker.mjs Outdated
Comment thread app/Sources/BrokerDashboardStore.swift
Comment thread broker-core/index.mjs Outdated
Comment thread client/bin/simbroker.mjs Outdated
Comment thread client/command-dispatch.mjs
Comment thread client/bin/simbroker.mjs Outdated
Comment thread README.md
Why:
- Address the safety, readiness, validation, and recovery gaps identified during PR #19 review.

Changed:
- Make provisioning cooperatively cancellable and attribute rollback only to devices created by the active setup attempt.
- Validate existing-host snapshots, runtime inputs, recovery guidance, and major-only host requirements.
- Preserve actionable setup failures in the macOS confirmation sheet and clarify next-Alpha artifact availability.
- Add focused broker, CLI, signal, formatter, and Swift regression coverage.

Verification:
- npm run test:broker-core
- npm run test:client
- npm run test:docs
- npm run test:harness-adoption
- npm run test:app
- npm run test:install-smoke
- npm run test:package-smoke
- npm run verify:public-surface
- ./script/build_and_run.sh --verify
- agent verify profiles: implementation, spec-only

Affected:
- README.md
- app/
- broker-core/
- client/

Refs:
- #19

Session:
- task-sessions/guided-setup-review
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: b3b17a0b01

ℹ️ 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 thread packages/simbroker/README.md Outdated
Comment thread client/bin/simbroker.mjs Outdated
Comment thread app/Sources/SharedViews.swift Outdated
Comment thread scripts/install_smoke.sh
Why:
New PR review found four user-facing gaps in setup recovery, app fallback identity, package availability copy, and smoke cleanup.

Changed:
Generate mismatch stop commands from the live service paths, preserve service socket overrides in app fallback copy, clarify alpha.2 availability, and make smoke service cleanup idempotent after partial apply failures.

Verification:
npm run test:broker-core; npm run test:client; npm run test:docs; npm run test:harness-adoption; npm run test:app; npm run test:install-smoke; npm run test:package-smoke; npm run verify:public-surface; ./script/build_and_run.sh --verify

Affected:
client/; app/; packages/simbroker/README.md; scripts/install_smoke.sh; docs/test/front-door.test.mjs

Refs:
#19

Session:
task-sessions/guided-setup-review-2
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: eb53bb69f4

ℹ️ 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 thread app/Sources/BrokerDashboardStore.swift
Comment thread app/Sources/BrokerDashboardStore.swift
Comment thread broker-core/index.mjs Outdated
Why:
- Setup cancellation could force-kill the CLI before bounded Simulator cleanup finished.
- A cancelled app flow could retain a stale confirmation, and one failed delete could skip the remaining rollback work.

Changed:
- Give confirmed setup apply a bounded cooperative cancellation window while retaining fast cancellation elsewhere.
- Clear retained setup plans after cancellation refresh.
- Attempt all rollback deletions, preserve the primary error, and report incomplete cleanup safely.

Verification:
- npm run test:broker-core
- npm run test:client
- npm run test:app
- npm run test:docs
- npm run test:harness-adoption
- npm run test:install-smoke
- npm run test:package-smoke
- npm run verify:public-surface
- ./script/build_and_run.sh --verify

Affected:
- app/
- broker-core/
- client/

Refs:
- PR #19 review follow-up

Session:
- task-sessions/guided-setup-review-3
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 657f92cbd0

ℹ️ 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 thread app/Sources/BrokerSnapshotLoader.swift
Comment thread client/bin/simbroker.mjs Outdated
Comment thread broker-core/index.mjs Outdated
Comment thread broker-core/index.mjs Outdated
Comment thread app/Sources/BrokerSetupModels.swift
Comment thread client/bin/simbroker.mjs Outdated
VladimirBrejcha and others added 3 commits August 23, 2026 12:55
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Repaired the implementation verification environment: the failure was caused by npm not materializing the lockfile-declared optional `@rolldown/binding-darwin-arm64` package. Reinstalling optional dependencies with a job-directory cache required no tracked dependency changes. The agent-harness build now passes, all 110 harness tests pass, the spec-only profile had already passed, and `git diff --check` remains clean.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session]

Affected:
- CHANGELOG.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/task-session]
- report: [controller artifact: jobs/pr-19/20260823-123653-04b4f2bb-4cb1-495b-bc45-fd3edd8a7659/report.md]
Why:
- Setup could trust the wrong app socket, retain long uninterruptible finishing waits, or report ready after relevant host identity changed.
- Post-commit registry recovery and concurrent setup lock timing did not cover their bounded contracts.

Changed:
- Enforce configured socket and schema identity in the app.
- Propagate cooperative cancellation through setup locks, service startup, snapshot, and doctor requests.
- Resume only an exact untouched starter registry and verify committed host and Simulator identities before success.
- Budget setup lock contention for bounded provisioning and rollback work, and align the setup contract.

Verification:
- npm run test:broker-core
- npm run test:client
- npm run test:app
- npm run test:docs
- npm run test:harness-adoption
- npm run test:install-smoke
- npm run test:package-smoke
- npm run verify:public-surface
- ./script/build_and_run.sh --verify

Affected:
- app/
- broker-core/
- client/
- spec/tasks/guided-simbroker-setup.md

Refs:
- PR #19 review follow-up

Session:
- task-sessions/guided-setup-review-4
Why:
- Missing lease or pin inventory must fail closed when deciding whether a committed setup is safe to resume.

Changed:
- Document the conservative unreadable-state branch beside the recovery guard.

Verification:
- npm run test:broker-core
- npm run test:docs

Affected:
- broker-core/index.mjs

Refs:
- PR #19 review follow-up

Session:
- task-sessions/guided-setup-review-4
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

Integrated the six review fixes at 24c5f676a7a5759ec5eff541ce4d82154207597b, including the concurrent autopilot patch and the locally verified safety refinements. All 22 review threads are resolved. Missing-registry recovery is intentionally limited to an exact untouched starter host with no lease, pin, or pending-retirement state; custom or ambiguous state remains blocked.

Verification is green for broker core, client, macOS app, docs, public-surface, harness implementation, and spec-only profiles.

@codex review

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

Copy link
Copy Markdown

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: 24c5f676a7

ℹ️ 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 thread broker-core/index.mjs
Comment thread client/bin/simbroker.mjs Outdated
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Repaired the implementation verification environment by restoring the lockfile-declared macOS ARM64 Rolldown binding. The exact failed harness command now passes 12 test files and 110 tests; the harness TypeScript build also passes. Product verification had already passed, spec-only passed, and the four-file review patch remains unchanged.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session]

Affected:
- CHANGELOG.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/task-session]
- report: [controller artifact: jobs/pr-19/20260823-132258-a616d5e1-1203-4223-93c3-3e5f1bfddac7/report.md]
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

Autopilot addressed the two Codex findings at 6761d36819c912ca8d5d022ae5dfbac9baa2af3b; all 24 review threads are resolved. Independent verification passes broker core (260/260) and client (197/197).

@codex review

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

Copy link
Copy Markdown

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: 6761d36819

ℹ️ 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 thread app/Sources/BrokerLocalCommandClient.swift
Comment thread client/setup-preflight.mjs Outdated
Comment thread client/bin/simbroker.mjs
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Kept the three review fixes and repaired the implementation-profile failure by pinning agent-harness Vitest to 3.x so harness tests no longer depend on Rolldown's Node 20.19+ native binding. Focused setup-preflight, setup CLI, app command-client, and agent-harness test runs passed locally.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session]

Affected:
- CHANGELOG.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/task-session]
- report: [controller artifact: jobs/pr-19/20260824-154750-a317e90a-f35f-4bc1-97ac-fe3ce02f5869/report.md]
@VladimirBrejcha VladimirBrejcha added the autopilot:on Enable Autopilot processing for this PR label Aug 24, 2026
Why:
- GitHub Node tests on ubuntu-latest cancel at timeout-minutes 30.
  public-surface can re-enable per-file git cat-file when git
  diff-files exits 1, in-process brokerd tests call real simctl, and
  service start can keep polling after spawned brokerd exits.

Changed:
- Treat git diff-files exit 1 as the dirty-name list instead of
  scanning every index blob.
- Inject SIMBROKER_SIMCTL_FIXTURE_STATE for in-process
  startBrokerService tests that write an app snapshot.
- Stop waiting when spawned brokerd exits even if a startup lock
  directory remains.
- Run Ubuntu client tests with --test-concurrency=1.

Verification:
- npm run agent:verify -- --profile spec-only --paths .github/workflows/ci.yml --paths CHANGELOG.md --paths client/bin/simbroker.mjs --paths client/public-surface.mjs --paths client/test/brokerd.test.mjs --paths client/test/public-surface.test.mjs --paths client/test/simbroker.test.mjs --paths docs/test/front-door.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-timeout
- npm run agent:verify -- --profile implementation --paths .github/workflows/ci.yml --paths CHANGELOG.md --paths client/bin/simbroker.mjs --paths client/public-surface.mjs --paths client/test/brokerd.test.mjs --paths client/test/public-surface.test.mjs --paths client/test/simbroker.test.mjs --paths docs/test/front-door.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-timeout

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- client/bin/simbroker.mjs
- client/public-surface.mjs
- client/test/brokerd.test.mjs
- client/test/public-surface.test.mjs
- client/test/simbroker.test.mjs
- docs/test/front-door.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32704860637

Session:
- task-sessions/ubuntu-ci-timeout
@VladimirBrejcha

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 7c9a093649

ℹ️ 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 thread client/bin/simbroker.mjs Outdated
Comment thread broker-core/index.mjs Outdated
Comment thread broker-core/index.mjs Outdated
Why:
- GitHub Node tests on 7c9a093 failed in broker-core, not at the
  30-minute cap. Test 159 expected an active-containment-requester
  skip for fixture pid 2500. After public-surface the Ubuntu
  test-runner pid can be 2500, so containment records
  current-broker-process first.

Changed:
- Process controllers may inject currentPid. Fixtures use a synthetic
  pid so hardcoded process tables cannot match the runner.
- The command-group requester test uses the live runner pid as the
  requester so that collision cannot pass vacuously.
- Add coverage for the current-broker-process skip.

Verification:
- npm run agent:verify -- --profile spec-only --paths CHANGELOG.md --paths broker-core/containment.mjs --paths broker-core/test/broker-core.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-pid-collision
- npm run agent:verify -- --profile implementation --paths CHANGELOG.md --paths broker-core/containment.mjs --paths broker-core/test/broker-core.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-pid-collision

Affected:
- CHANGELOG.md
- broker-core/containment.mjs
- broker-core/test/broker-core.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32717787296

Session:
- task-sessions/ubuntu-ci-pid-collision
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Addressed all three active review threads: fail closed on unreadable doctor state instead of reporting ready, bind existing-host confirmation to the requested host ID, and fall back to the device-type inventory when runtime records omit supportedDeviceTypes.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session]

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/containment.mjs
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/public-surface.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/brokerd.test.mjs
- client/test/public-surface.test.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/task-session]
- report: [controller artifact: jobs/pr-19/20260824-201120-8ec7e2e0-1433-4a42-8df5-e47b4aa468fb/report.md]
Why:
- GitHub Node tests on 4dd3464 cancel at timeout-minutes 30 after
  broker-core passes. Client TAP stops at the last brokerd test.
  --test-concurrency=1 only serializes files; in-file brokerd tests
  still overlap, and a hung service start can wait ~26.75 minutes.

Changed:
- Run brokerd and simbroker client tests with describe concurrency 1.
- Bound CLI spawn waits to 60 seconds.
- Ubuntu CI adds --test-timeout=120000 and --test-force-exit.

Verification:
- npm run agent:verify -- --profile spec-only --paths .github/workflows/ci.yml --paths CHANGELOG.md --paths client/test/brokerd.test.mjs --paths client/test/simbroker.test.mjs --paths docs/test/front-door.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-client-hang
- npm run agent:verify -- --profile implementation --paths .github/workflows/ci.yml --paths CHANGELOG.md --paths client/test/brokerd.test.mjs --paths client/test/simbroker.test.mjs --paths docs/test/front-door.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-client-hang

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- client/test/brokerd.test.mjs
- client/test/simbroker.test.mjs
- docs/test/front-door.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32727234214

Session:
- task-sessions/ubuntu-ci-client-hang
Why:
- GitHub Node tests on babaeef failed in client tests, not at the
  30-minute cap. --test-force-exit made Node 20 cancel the last 11
  simbroker tests with cancelledByParent while they were still queued.

Changed:
- Drop --test-force-exit from Ubuntu CI. Keep file concurrency 1,
  --test-timeout=120000, and in-file describe concurrency 1.

Verification:
- npm run agent:verify -- --profile spec-only --paths .github/workflows/ci.yml --paths CHANGELOG.md --paths docs/test/front-door.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-force-exit

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- docs/test/front-door.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32814657546

Session:
- task-sessions/ubuntu-ci-force-exit

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: f4c356edff

ℹ️ 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 thread client/bin/simbroker.mjs Outdated
Comment thread client/bin/simbroker.mjs Outdated
VladimirBrejcha and others added 2 commits August 25, 2026 15:12
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Setup previews now probe service identity on fresh unconfigured hosts and treat newer known-projects, lease, and pin records as stale-snapshot finishing work instead of reporting ready.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session]

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/containment.mjs
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/public-surface.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/brokerd.test.mjs
- client/test/public-surface.test.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/task-session]
- report: [controller artifact: jobs/pr-19/20260825-150121-8953dc9c-341b-400f-934b-7bd5fb350195/report.md]
Why:
- GitHub Node tests on f4c356e failed in client tests, not at the
  30-minute cap. 179 tests passed and the last 11 simbroker tests were
  cancelledByParent after an unref'd keepalive child made Node 20 fire
  beforeExit during await.

Changed:
- Spawn lease-owner and command keepalives without unref().
- Wait for those children to exit, then SIGKILL leftovers in finally.

Verification:
- node --test --test-concurrency=1 --test-timeout=120000 client/test/*.test.mjs
- npm run agent:verify -- --profile spec-only --paths CHANGELOG.md --paths client/test/simbroker.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-unref-keepalive
- npm run agent:verify -- --profile implementation --paths CHANGELOG.md --paths client/test/simbroker.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-unref-keepalive

Affected:
- CHANGELOG.md
- client/test/simbroker.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32816908133

Session:
- task-sessions/task-sessions

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

Copy link
Copy Markdown

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: 3871950f96

ℹ️ 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 thread broker-core/index.mjs Outdated
Comment thread broker-core/index.mjs
Comment thread app/Sources/BrokerDashboardStore.swift Outdated
Comment thread client/bin/simbroker.mjs Outdated
Comment thread client/bin/simbroker.mjs Outdated
Why:
- GitHub Node tests on 3871950 failed in client tests, not at the
  30-minute cap. Keepalive simbroker tests passed. The whole
  install-distribution.test.mjs file timed out at --test-timeout=120000
  because package_distribution.sh reruns verify:public-surface, which
  takes about 11 minutes on Ubuntu.

Changed:
- Skip the four package_distribution.sh client tests unless Darwin.

Verification:
- node --test --test-concurrency=1 --test-timeout=120000 client/test/install-distribution.test.mjs
- npm run agent:verify -- --profile spec-only --paths CHANGELOG.md --paths client/test/install-distribution.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-package-distribution-skip
- npm run agent:verify -- --profile implementation --paths CHANGELOG.md --paths client/test/install-distribution.test.mjs --paths spec/build-and-test.md --session-dir task-sessions/ubuntu-ci-package-distribution-skip

Affected:
- CHANGELOG.md
- client/test/install-distribution.test.mjs
- spec/build-and-test.md

Refs:
- #19
- https://github.com/fiveonecode/simulator-broker/actions/runs/32821098596

Session:
- task-sessions/ubuntu-ci-package-distribution-skip

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

Copy link
Copy Markdown

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: 3f50a04109

ℹ️ 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 thread app/Sources/BrokerLocalCommandClient.swift Outdated
VladimirBrejcha and others added 3 commits August 25, 2026 16:07
Why:
- GitHub-hosted Ubuntu spent ~11 minutes scanning the runner homedir, which
  is not the operator home path, then ran macOS client tests in an
  environment with no Simulator. Packaging tests also reran that scan.

Changed:
- Ubuntu CI (10m) runs skill ownership, broker-core, and harness-adoption.
- macOS CI (15m) runs client tests. Neither job runs verify:public-surface
  or test:app. Home-path scanning stays on local npm test.
- package_distribution.sh scans the staged payload only.

Verification:
- npm run agent:verify -- --profile spec-only --paths .github/workflows/ci.yml --paths scripts/package_distribution.sh --paths client/test/install-distribution.test.mjs --paths docs/test/front-door.test.mjs --paths docs/status.md --paths CONTRIBUTING.md --paths CHANGELOG.md --paths spec/build-and-test.md --paths spec/README.md --session-dir task-sessions/ci-split-ubuntu-macos
- npm run agent:verify -- --profile implementation --paths .github/workflows/ci.yml --paths scripts/package_distribution.sh --paths client/test/install-distribution.test.mjs --paths docs/test/front-door.test.mjs --paths docs/status.md --paths CONTRIBUTING.md --paths CHANGELOG.md --paths spec/build-and-test.md --paths spec/README.md --session-dir task-sessions/ci-split-ubuntu-macos

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- CONTRIBUTING.md
- docs/status.md
- docs/test/front-door.test.mjs
- scripts/package_distribution.sh
- spec/README.md
- spec/build-and-test.md

Refs:
- #19

Session:
- task-sessions/ci-split-ubuntu-macos
Why:
- GitHub-hosted macOS client tests timed out the install-distribution file
  after 120 seconds. Payload-scan tests copy the runtime and scan the
  staged tree, which exceeds that budget. Local npm test still runs them.

Changed:
- Skip package_distribution payload-scan tests when CI is set or the
  platform is not Darwin. Install and archive-name tests still run.

Verification:
- npm run agent:verify -- --profile spec-only --paths client/test/install-distribution.test.mjs --paths spec/build-and-test.md --paths CHANGELOG.md --paths docs/status.md --session-dir task-sessions/ci-macos-packaging-skip
- npm run agent:verify -- --profile implementation --paths client/test/install-distribution.test.mjs --paths spec/build-and-test.md --paths CHANGELOG.md --paths docs/status.md --session-dir task-sessions/ci-macos-packaging-skip
- CI=true node --test --test-concurrency=1 --test-timeout=120000 client/test/install-distribution.test.mjs

Affected:
- CHANGELOG.md
- client/test/install-distribution.test.mjs
- docs/status.md
- spec/build-and-test.md

Refs:
- #19

Session:
- task-sessions/ci-macos-packaging-skip
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Addressed all six Codex review threads: fail closed on schema-invalid lease/pin JSON, make fallback device-type selection order-stable, keep automatic finishing off the setup sheet, treat doctor-record deletions as snapshot finishing work, preserve selected path overrides in recovery commands, and include rollback inventories in the Stop/timeout grace window.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session]

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- CONTRIBUTING.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/containment.mjs
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/public-surface.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/brokerd.test.mjs
- client/test/install-distribution.test.mjs
- client/test/public-surface.test.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- scripts/package_distribution.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/task-session]
- report: [controller artifact: jobs/pr-19/20260825-162015-12a4bca4-3c8e-47d3-ad4f-31b5204c837c/report.md]

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

Copy link
Copy Markdown

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: 3739272106

ℹ️ 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 thread broker-core/index.mjs
Comment thread client/bin/simbroker.mjs Outdated
Comment thread broker-core/index.mjs
Comment thread app/Sources/BrokerDashboardStore.swift
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Closed four review findings with small fail-closed setup fixes: complete lease identity validation, selected-path service-identity retries, blocking fresh setup over existing state-root artifacts, and refreshing the macOS dashboard on an already-ready preview.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session]

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- CONTRIBUTING.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/containment.mjs
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/public-surface.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/brokerd.test.mjs
- client/test/install-distribution.test.mjs
- client/test/public-surface.test.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- scripts/package_distribution.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/task-session]
- report: [controller artifact: jobs/pr-19/20260825-164548-38b5262d-5f36-4760-a75c-efad32bfa3dc/report.md]

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

Copy link
Copy Markdown

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: b6019972b1

ℹ️ 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 thread broker-core/index.mjs
Comment thread broker-core/index.mjs
Comment thread broker-core/index.mjs
Why:
- Resolve actionable GitHub review feedback for PR #19.

Changed:
- Setup now fail-closes on snapshot-incomplete live leases and pins, and on schema-invalid persisted registry alias data, instead of finishing those hosts as ready.

Verification:
- npm run agent:complete -- --session-dir [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session]
- npm run agent:context -- --paths-file [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/actual-paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session]
- npm run agent:verify -- --profile implementation --paths-file [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session/verify/implementation/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session]
- npm run agent:verify -- --profile spec-only --paths-file [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session/verify/spec-only/paths.txt] --session-dir [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session]

Affected:
- .github/workflows/ci.yml
- CHANGELOG.md
- CONTRIBUTING.md
- Casks/simulator-broker.rb
- Formula/simbroker.rb
- README.md
- agent-harness/package-lock.json
- agent-harness/package.json
- app/README.md
- app/Sources/BrokerDashboardStore.swift
- app/Sources/BrokerLocalCommandClient.swift
- app/Sources/BrokerOnboardingCommands.swift
- app/Sources/BrokerServiceClient.swift
- app/Sources/BrokerSetupModels.swift
- app/Sources/BrokerSnapshotLoader.swift
- app/Sources/RootView.swift
- app/Sources/SetupPlanDevicesView.swift
- app/Sources/SetupPlanPrerequisitesView.swift
- app/Sources/SetupPlanSheet.swift
- app/Sources/SharedViews.swift
- app/Tests/BrokerDashboardStoreTests.swift
- app/Tests/BrokerLocalCommandClientTests.swift
- app/Tests/BrokerOnboardingCommandsTests.swift
- app/Tests/BrokerRuntimePathsTests.swift
- app/Tests/BrokerServiceClientTests.swift
- app/Tests/BrokerSnapshotLoaderTests.swift
- broker-core/containment.mjs
- broker-core/error-contract.mjs
- broker-core/index.mjs
- broker-core/simctl.mjs
- broker-core/test/broker-core.test.mjs
- client/bin/simbroker.mjs
- client/command-dispatch.mjs
- client/public-surface.mjs
- client/service/service-client.mjs
- client/setup-preflight.mjs
- client/setup-provisioning-worker.mjs
- client/setup-provisioning.mjs
- client/test/brokerd.test.mjs
- client/test/install-distribution.test.mjs
- client/test/public-surface.test.mjs
- client/test/setup-preflight.test.mjs
- client/test/simbroker.test.mjs
- docs/concepts.md
- docs/getting-started.md
- docs/status.md
- docs/test/front-door.test.mjs
- examples/harness-adoption/README.md
- examples/harness-adoption/sample-consumer-repo/.simulator-broker/project.json
- examples/harness-adoption/sample-consumer-repo/README.md
- packages/simbroker/README.md
- scripts/install_smoke.sh
- scripts/package_distribution.sh
- spec/README.md
- spec/architecture.md
- spec/build-and-test.md
- spec/global-simulator-broker.md
- spec/project-structure.md
- spec/tasks/README.md
- spec/tasks/guided-simbroker-setup.md

Refs:
- #19
- #19 (comment)
- #19 (comment)
- #19 (comment)

Session:
- task-session: [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/task-session]
- report: [controller artifact: jobs/pr-19/20260825-171439-3657ed81-cb02-408b-9e4f-0021828b8f1e/report.md]

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

Copy link
Copy Markdown

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: 5969bc879e

ℹ️ 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 thread broker-core/index.mjs

function setupStateContainsExistingBrokerArtifacts(paths) {
try {
if (fs.existsSync(paths.registryPath) && fs.statSync(paths.registryPath).isFile()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject any occupied registry path before provisioning

When a fresh state root contains registry.json as a directory, FIFO, or another non-regular entry, this condition treats the root as empty and presents a confirmable setup plan. Apply then creates the Simulators and commits the host before loadBrokerState attempts to read that path; a directory causes a post-commit failure, while a FIFO can block the synchronous read indefinitely. Treat any existing registry path as ambiguous broker state so setup blocks before mutation.

AGENTS.md reference: AGENTS.md:L7-L12

Useful? React with 👍 / 👎.

Comment thread broker-core/index.mjs
Comment on lines +1671 to +1672
listJsonFiles(paths.leasesDir).forEach(assertValidLeaseRecord);
listJsonFiles(paths.pinsDir).forEach(assertValidPinRecord);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate lease and pin references against the host

Fresh evidence beyond the prior field-completeness comments is that structurally complete records are never cross-checked against hostConfig: a live lease or pin can name an alias absent from the host, and a lease can pair a configured alias with the wrong Simulator ID. These records pass preview, survive loadBrokerState, and are invisible to doctorBroker's configured-alias health loop, allowing setup to report ready with dangling or misattributed mutation state; validate alias membership and lease Simulator identity here before automatic finishing.

AGENTS.md reference: AGENTS.md:L7-L12

Useful? React with 👍 / 👎.

Comment thread broker-core/index.mjs
summary: registryHealth === "repair-needed" || registryHealth === "repairing"
? `Managed alias ${alias.alias} requires repair before setup can continue.`
: `Managed alias ${alias.alias} does not resolve to its configured available Simulator.`,
remediationCommands: [`simbroker simulators repair --alias ${alias.alias}`],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve custom paths in blocker repair commands

When an existing host selected through custom --host-config, --state-root, or --service-socket paths has an unhealthy alias, this command is surfaced verbatim in the blocked preview and app sheet. Copying it repairs the default broker rather than the broker setup just inspected; the same problem affects the bare doctor commands on malformed host, registry, lease, and pin blockers. Fresh evidence beyond the earlier failure-recovery and service-mismatch fixes is that blocker remediation still originates here without the selected broker paths, so these commands need to be decorated with the active path flags before presentation.

AGENTS.md reference: AGENTS.md:L7-L12

Useful? React with 👍 / 👎.

Comment thread client/bin/simbroker.mjs
return `'${String(value).replaceAll("'", "'\\''")}'`;
}

function setupRecoveryCommand(paths) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve host and runtime selections in recovery

When fresh setup is invoked with an explicit --host-id or --ios-version and provisioning fails before the host commit, the advertised recovery command retains only path overrides. Running it previews the default host ID and newest runtime instead of retrying the requested installation, so recovery silently changes the user's setup intent and produces a different plan. Pass the original setup selections into this command for pre-commit failures.

Useful? React with 👍 / 👎.

Comment thread client/bin/simbroker.mjs
Comment on lines +736 to +737
} catch (error) {
return blockedSetupPreview(paths, [...prerequisites, setupPrerequisiteFromError(error)], options);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish host path failures from Simulator inventory errors

When an existing --host-config is writable but unreadable, or is itself a directory, the path prerequisite passes because it checks only write access. previewSetupBroker then throws EACCES or EISDIR, and this catch converts every such exception into a simctl-inventory blocker with xcrun simctl remediation commands. The operator is consequently sent to repair Xcode while the actual host path remains unusable; require a readable regular host-config file or preserve and classify host/state I/O failures separately.

AGENTS.md reference: AGENTS.md:L7-L12

Useful? React with 👍 / 👎.

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

Labels

autopilot:on Enable Autopilot processing for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant