Skip to content

fix(ui-mac): A4 embedded-server version + B17 test coverage (71→97) - #33

Merged
jinjunnn merged 2 commits into
alphafrom
feat/a4-server-version-and-tests
Jul 3, 2026
Merged

jinjunnn merged 2 commits into
alphafrom
feat/a4-server-version-and-tests

Conversation

@jinjunnn

@jinjunnn jinjunnn commented Jul 3, 2026

Copy link
Copy Markdown
Owner

A4: embedded opencode server's InstallationVersion was local → @opencode-ai/plugin@local install fails for .opencode-plugin projects. Patch the gitignored build output (upstream source untouched, ADR-005) to a real version 1.17.13 via a new prebuild step; drift-tripwire warns if upstream reworders it. Verified: 0 local fallbacks remain.

B17: +26 tests (model assembly, provider key-status + masking, endpoint contract) → 97 pass / 0 fail, all temp-scoped.

Zero upstream edits. typecheck ✓.

🤖 Generated with Claude Code

jinjunnn and others added 2 commits July 3, 2026 10:11
…rsion (kill @plugin@local)

The embedded server (built by upstream script/build-node.ts, which we can't edit — ADR-005)
leaves OPENCODE_VERSION undefined, so InstallationVersion falls back to "local". Any project with
.opencode plugins then tries `npm install @opencode-ai/plugin@local` (no such version) and the first
request hangs (register A4, ~152× in logs). Confirmed still live in the packaged bundle:
  InstallationVersion = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "local"

Fix without touching upstream source: new alpha post-build step (scripts/patch-server-version.ts,
wired into prebuild after build-node) patches the gitignored build output — swaps the "local" fallback
for a real published version (1.17.13, latest @opencode-ai/plugin; ALPHA_OPENCODE_VERSION overrides).
If upstream reworders the expression the patch no-ops + WARNs (drift tripwire), never silently rots.
Verified: dist/node/node.js fallback now "1.17.13", 0 "local" fallbacks remain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nt contract (71→97)

Adds 26 bun tests over alpha pure-logic paths beyond the security suite:
- alpha-models: buildAlphaModelConfig/getModelCatalog — escape hatch, BYOK nodes only when keyed
  (openai vs anthropic npm, key inlined), platform gateway front-of-list only with ALPHA_BASE_URL
  (key as {env:ALPHA_API_KEY} ref, never inlined), ALPHA_DEFAULT_MODEL, user provider merge.
- alpha-provider-status: getProviderKeyStatus source priority (keychain>env>jsonc>none) + last-4
  masking (short-key ••, full key never leaked); safeStorage keychain mocked.
- shared/alpha-config: contract lock on ALPHA_ENDPOINTS/PATHS (https, no trailing slash, gateway
  never regresses to the api.tidelabs.click host that 404'd /v1).
All temp-scoped (no ~/.config pollution). 97 pass / 0 fail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@jinjunnn
jinjunnn merged commit f31685a into alpha Jul 3, 2026
6 of 11 checks passed
@jinjunnn
jinjunnn deleted the feat/a4-server-version-and-tests branch July 3, 2026 02:14
jinjunnn added a commit that referenced this pull request Jul 22, 2026
…sent dialog (#225) (#511)

* design: upload consent UX 设计稿 (approved) (#225)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* privacy(ui-mac): main-authoritative upload manifest + consent + dialog (#225)

Implements aw#10 client-side upload consent in the alpha-code desktop app:
main process is the sole authority for the upload manifest (tenant binding,
canonical paths, per-file SHA-256, totals, retention, egress, consent_required)
and issuance of the upload_consent token via alpha-web; renderer can only send
an opaque request id + kind. Conditional consent (dialog only when genuine
privacy content is present). Free-text PII classification lives here (server
#33 handles high-confidence markers only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: jinjunnn <slmbaovanetti99@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant