Commit Graph
13 Commits
Author SHA1 Message Date
haelyra a0e6eb56e4 Merge reviewed PR #3830 2026-11-05 23:24:06 -05:00
Brian 2f898d7bfe test: keep non-symlink assertions running when symlinks are refused
Review on #3830 found two places where the early return added in 09de2c24
also skipped assertions that never needed a symlink:

- coordination-inventory: the oversized-JSON and missing-directory checks
  were skipped. The expected task count holds whether or not the link
  exists, so trySymlink is now called as a plain statement.
- frontend-design-direction: the incomplete-gate, malformed-input and
  no-argument checks were skipped. Link-based artifacts are now appended
  only when their link succeeds, so a refusal narrows the case list
  instead of ending the test. The junction case now runs on Windows,
  where it previously sat behind two returns that had already fired.

Also converts the one remaining direct fs.symlinkSync in
opencode-consent-legacy-lock. Junctions are permitted without elevation
on Windows, so that call did not fail here, but it still throws on a
filesystem with no symlink support at all.
2026-10-31 13:19:25 -04:00
Ali Arslan 7b3075180f test(opencode): assert the stub removal was attempted 2026-10-29 01:29:23 +05:00
Ali Arslan d2df54a2ef fix(opencode): never report repair success while the pre-fix stub is retained 2026-10-29 01:06:32 +05:00
Ali Arslan 770eb29b9f fix(opencode): remove the pre-fix declined stub the legacy migration leaves behind 2026-10-28 23:30:39 +05:00
Ali Arslan b2f4abb4c4 fix(opencode): treat the pre-fix declined factory stub as inactive during migration 2026-10-28 23:17:07 +05:00
Ali Arslan 73f61801db fix(opencode): make the declined-hooks plugin stub satisfy the V2 loader schema
The inert stub written when hook consent is not granted was
`export default async () => ({})`. OpenCode v2 validates every plugin
module before running it and requires the default export to be a definition
object with an `id` and an `effect` or `setup` function, so a declined or
runtime-less home install printed the same startup error as the V1 hook
plugin:

  PluginModule.LoadError: Plugin must export a default definition with an id
  and an effect or setup function.
  (cause: SchemaError(Expected object at ["default"]))

Write `export default { id: "ecc-hooks", setup() {} }` instead. It keeps the
inert behaviour (no imports, no module initialization of the replaced
plugin) and satisfies the loader.

Tests that pinned the generated bytes now compare against
getDisabledOpenCodePluginContent() rather than a duplicated literal, and
tests/opencode-plugin-loader-contract.test.js asserts the loader contract on
the generated payload. That test fails on the previous stub
("default export must be an object, got function").

Refs #3537. The same assertion should cover .opencode/plugins/*.ts once a V2
entrypoint lands (#3536, #3224); those plugins are scanned independently in
home installs, so both the barrel and the implementation are loaded.
2026-10-28 22:32:41 +05:00
Brian 09de2c247a test: skip symlink tests when the OS refuses symlink creation
Adds a trySymlink helper that logs the existing skip notice and returns
false on EPERM/EACCES/ENOSYS, and uses it where tests created symlinks
unguarded. Non-admin Windows accounts without Developer Mode now skip
these cases instead of failing.
2026-10-26 15:08:05 -04:00
affaan-m 615b7f107a test(install): mutate postimage fixtures through owned descriptors
Preserve contributor history and current-main behavior while resolving the exact reviewed follow-up.

Source-PR: https://github.com/affaan-m/ECC/pull/3008
Source-Parent: be9fe61ef7
Review-Manifest-SHA256: 1e03bb3845a5bb2f3d48a943e137a291c52dd4079c9d5ae941d1e04265df7946
2026-09-28 02:28:29 -04:00
affaan-m be9fe61ef7 fix(install): verify legacy postimages with owned descriptors
Preserve contributor history and current-main behavior while resolving the exact reviewed follow-up.

Source-PR: https://github.com/affaan-m/ECC/pull/3008
Source-Parent: c492920468
Review-Manifest-SHA256: 4f71a8f8d4d3aedcfb03f41d37274c28c6b83b39250d2f466e7f8243325ae09a
2026-09-28 02:14:19 -04:00
affaan-m c492920468 fix(install): bind legacy reads to trusted access flags
Preserve contributor history and current-main behavior while resolving the exact reviewed follow-up.

Source-PR: https://github.com/affaan-m/ECC/pull/3008
Source-Parent: ef8c2d8b9c
Review-Manifest-SHA256: 6189690fc7dd826fda286e46a5d3ec8d50b6049740f74f0dbd4490a36a76854c
2026-09-28 01:36:41 -04:00
affaan-m ef8c2d8b9c fix(opencode): guard legacy cleanup and portable consent fixtures
Preserve contributor history and current-main behavior while resolving the exact reviewed follow-up.

Source-PR: https://github.com/affaan-m/ECC/pull/3008
Source-Parent: d0dc1fcb08
Review-Manifest-SHA256: 8f15febd33dfa9f9ac6e70cb41f75ffee7aca47dd21782e841c33d4874341d6e
2026-09-28 00:54:21 -04:00
affaan-m 923019d99f fix(opencode): preserve consent ownership through guarded install and repair 2026-09-27 20:32:22 -04:00