Skip to content

fix(checkup): bind plan and apply to explicit provider homes - #30

Merged
phodal merged 2 commits into
QoderAI:mainfrom
NickyLam:fix/ha02-provider-aware-checkup-plan
Jul 31, 2026
Merged

fix(checkup): bind plan and apply to explicit provider homes#30
phodal merged 2 commits into
QoderAI:mainfrom
NickyLam:fix/ha02-provider-aware-checkup-plan

Conversation

@NickyLam

Copy link
Copy Markdown
Contributor

Summary

Checkup plan/apply was Qoder-hard-coded:

  1. buildCheckupPlan() always emitted qoder-cli / qodercli disable mutations for candidates, including when scan.provider was codex, cursor, or another host.
  2. resolveSourceRef() and scan fingerprints always bound provider-home to Qoder home, so a patch could resolve into another host's configuration root.

This change makes plan/apply provider-aware and fail closed (roadmap HA-02):

  • only provider=qoder can produce or execute automatic qodercli disable actions
  • other hosts keep candidates as manual-review until a provider-native apply contract exists
  • provider-home source resolution and fingerprints bind to the explicit host home
  • apply rejects cross-provider qoder-cli mutations before spawning a process

Why

Traceability and Scope

  • Spec/ADR: docs/specs/2026-07-31-ha02-provider-aware-checkup-plan.md
  • Acceptance criteria addressed: AC-1 through AC-5
  • Canonical owners changed: scripts/coding-agent-practices/checkup/
  • Explicit non-goals: HA-01 capability profiles; no new non-Qoder automatic apply contracts

Change Type

  • Feature
  • Bug fix
  • Tests only
  • Documentation/community
  • Refactor with no intended behavior change
  • Dependency, packaging, or infrastructure

Test and Review Evidence

Check Result
node --test test/harness-checkup.test.mjs 26/26 pass
node --test test/harness-checkup.test.mjs test/support-declarations.test.mjs test/doc-link-graph.test.mjs 38/38 pass
Manual repro after fix codex/cursor plans emit only manual-review; Codex provider-home resolves under codexHome, not Qoder home

Risk and Recovery

  • Compatibility and cross-platform impact: portable path resolution; Windows/macOS/Linux covered by existing path helpers and unit tests
  • Package, plugin, schema, or generated-file impact: plan action shapes for non-Qoder hosts now use manual-review instead of qoder-cli; Qoder path unchanged
  • Rollback or recovery path: revert the single commit
  • Residual risk: source-patch still applies only under workspace or the bound provider home; no new host mutation executor is claimed

AI Involvement

  • Level: Assisted
  • Human review and validation: focused Node tests and manual provider binding repro recorded above

Checklist

  • I followed AGENTS.md, CONTRIBUTING.md, and the relevant canonical-owner guidance.
  • The change is focused and does not include unrelated local or generated state.
  • Tests and documentation match the behavior actually delivered.
  • Markdown links were checked when documentation moved or changed.
  • Cross-platform behavior was considered for Windows, macOS, and Linux.
  • Package/runtime verification was run when shipped files or dependencies changed. Not applicable: no package bundle or dependency change.
  • User-facing or compatibility changes are recorded in CHANGELOG.md.
  • I have the right to contribute this work under the repository's MIT License.

linmaog and others added 2 commits July 31, 2026 10:23
Checkup plans for Codex, Cursor, and other non-Qoder hosts were emitting
qodercli disable mutations, and provider-home paths always resolved through
Qoder home. Make plan/apply provider-aware so only Qoder can use qoder-cli,
other hosts stay manual-review, and source fingerprints bind to the plan's
host root (roadmap HA-02).

Spec: docs/specs/2026-07-31-ha02-provider-aware-checkup-plan.md
Test: node --test test/harness-checkup.test.mjs test/support-declarations.test.mjs test/doc-link-graph.test.mjs (38 pass)

Co-authored-by: Grok (Grok 4.5) <grok@x.ai>
Resolve conflicts between HA-02 provider-aware checkup plan/apply and the
main-side symlink safety hardening:

- apply.mjs: keep provider-aware resolveSourceRef (resolveProviderHome,
  provider field) and retain main's root field, assertSafeSourceTarget,
  and ensureSafeBackupDirectory safety checks
- contract.mjs: import expandHome via session-analysis public surface
  (index.mjs) to satisfy the scripts composition contract
- CHANGELOG.md and harness-checkup tests: keep both sides' entries/tests

Validated with npm test: 1038/1038 pass.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@phodal
phodal merged commit 92a7e74 into QoderAI:main Jul 31, 2026
4 checks passed
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