Repository navigation
fix(opencode): override inherited disabled flags - #3469
Conversation
Set disabled to false in generated OpenCode V2 registrations so a lower-priority disabled entry cannot keep approved setup stale. Cover layered JSON/JSONC refreshes, idempotent setup and doctor readiness, exact backups, preserved lower settings, malformed-config refusal, and the exclusion of disabled registrations from automatic maintenance. Update the native V2 registration expectations. Fixes morluto#3318
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
|
TL;DR: Two OpenCode V2 setup tests fail on main and pass with this PR. The PR now writes disabled: false into the V2 entry. I skipped the end-to-end setup test file, so that part is not checked. Thanks, Haoran Xu, for the fix. I ran two of the three test files on main 62bf098 (#4169). First with only the PR's test changes, then with the source change too.
Both failures are in the "OpenCode V2 native server table" group of The new case in Not run
Commands# main 62bf09809 extracted to a work tree, then npm ci, npm run build, npm run test:prepare
# the two non-doctor test diffs split out of 3469.tests.diff
patch -p1 -d <tree> < clientConfigurationDialects.test.diff
patch -p1 -d <tree> < updateMaintenance.test.diff
npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/process-global/updateMaintenance.test.ts # exit 1
patch -p1 -d <tree> < 3469.src.diff
npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/process-global/updateMaintenance.test.ts # exit 0Test setup🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
@morluto I investigated the failed CI rerun for #3469. The failing run checked out On Windows x64 / Node 24.18.0, I reproduced the timeout on both the unmodified upstream base and the same base with Round 6 applied, under the original deadlines. The test executes 16 sequential CLI commands, exhausting its aggregate test budget. The Round 6 V2 producer change is not exercised by this particular fixture, which uses the OpenCode V1 configuration. Main already includes The OpenCode V2 public regression tests still pass 5/5 with the approved fix. No production or timeout changes are needed based on this investigation. The original hosted runner's exact waiting point remains unknown, and the required CI is still red. Successful CI validation against an integration tree containing the existing upstream test correction is still needed. Thanks for reviewing. |
|
@morluto Quick follow-up: the third CI attempt has now completed successfully at the unchanged PR head, including all five test shards, Portable tests, and the required CI check. The earlier lifecycle timeout did not recur, and no additional source changes were needed. Thanks for rerunning the checks! |
fix(opencode): override inherited disabled flags
Summary
Fixes #3318. Explicitly activate OpenCode V2 registrations created by approved setup so an inherited disabled flag cannot keep setup and doctor stale.
Problem and expected behavior
When a lower-priority configuration contains
disabled: true, the generated upper registration previously omitted that field. Recursive merging retained the disabled state: setup wrote the registration but exited 1 withneeds_human/stale; repeating setup planned zero actions and still failed. Explicit setup should activate the selected integration.Change and scope
Set
disabled: falsein the native V2 entry producer. Preserve the existing merge and diagnostic rules, lower configuration bytes, backups and other client dialects. Automatic maintenance continues to exclude disabled registrations; a regression covers that boundary.Contract and boundary impact
clientRegistrationEntry, native OpenCode V2 registration construction.Expected effects of the registration workflow:
The configuration effect is the existing approved upper registration write.
Evidence and regression coverage
Five real CLI cases cover JSON/JSONC, inherited disabled/enabled controls, idempotence, doctor readiness, exact backups, preserved lower settings and unrelated entries, retained JSONC comments, and malformed-lower-configuration refusal.
On unchanged production source at
a32b4b6ac54a02a8fe9a7cb62861e54473ba5eb0, the two inherited-disabled cases fail and the other three pass. With the fix, all five pass.An additional automatic-maintenance control verifies that an inherited disabled V2 registration is not selected and neither configuration layer changes. Two native V2 registration expectations are updated.
Independent CLI replay made 12 calls: first setup, repeated setup and doctor for disabled/enabled fixtures on both versions. Disabled-fixture exits changed from
1/1/1to0/0/0; enabled controls remained0/0/0. Setup readiness changed fromneeds_human/staletoready/aligned; repeated setup still plans zero actions.Remaining proof gaps: no installed OpenCode client, live provider, POSIX host, full suite/CI or successful complete package verification was exercised.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
Windows x64, Node 24.18.0, npm 11.16.0, locked dependencies:
npm run test:focused -- tests/acceptance/setup/opencodeV2ClientSetup.test.ts— baseline 2 failed / 3 passed; fixed 5 passed.npm exec --no -- vitest run --project process-global tests/process-global/updateMaintenance.test.ts -t "maintenance activation and layered configuration"— 4 passed; 23 unrelated tests unselected.npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts tests/boundary/filesystem/clientConfigurationEnvironment.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts— baseline and fixed each 55 passed / 21 failed. All 21 failure names, primary errors and normalized assertion signatures match. Failures concern unchanged POSIX launcher expectations and host path spelling; the layered-environment 8/8 and environment 22/22 cases pass.npm run check— passed: typecheck, formatting, lint, knip, metadata, module boundaries and architecture guards. Lint reports 0 errors / 1381 warnings; changed-file warning categories are unchanged from baseline.npm run verify:test-discovery— 1274 test files discovered exactly once.npm pack --dry-run --json— passed, 1648 entries.npm run verify:package— baseline and fixed fail at the repository-skill stage with Windowsspawn npm ENOENT, before package installation.npm run verify:package:windows— baseline and fixed fail withWindows package omitted native/windows/build/manifest.json. The source checkout lacks the official native artifacts, which require the documented Linux/MinGW preparation path.git diff --checkand the normal staged formatting/lint commit hook — passed. The committed diff is byte-identical to the reviewed and validated diff.Compatibility, safety, and release
Author readiness
Human owner: @CmsChase
Before merge
type(scope): outcome.