Skip to content

C4: Verification harness — v2 host smoke test and schema validation in CI #27

Closed

Description

@diegohb

Parent

Part of #23 (Spec: opencode-architect 1.0.0)

What to build

An automated harness that loads the built plugin against a real opencode v2 host and asserts registrations (agents present, permissions registered), plus validation of produced fixture configs against the v2 config schema. Facts C1 marked for empirical confirmation are settled here and written back into the verified-facts record. Runs in CI so SDK drift fails a build instead of failing a consumer. This harness gates the guidance rewrite tickets.

Acceptance criteria

  • Harness loads the built plugin under v2 and fails on registration loss
  • Produced fixture configs validate against the v2 schema
  • Open empirical items from C1 are resolved and recorded
  • Harness runs in CI and is green

Blocked by

  • #C3

Activity

  1. self-assigned this
    on Oct 6, 2026
  2. diegohb commented on Oct 6, 2026

    @diegohb
    MemberAuthor

    Acceptance criteria verified — all four confirmed, with CI evidence:

    • Harness loads the built plugin under v2 and fails on registration loss — tests/v2-host.test.ts loads the built package entry through the real @opencode/plugin@2.0.23 host machinery (resolution, module contract, Effect activation) and audits registrations against real @opencode/schema Agent.Info: all ten agents, one permission evaluate hook, hook rewrites bundled external_directory asks end to end. Negative controls prove failure detection: an activation whose suite fails to load yields ≥10 audit violations (never a silent pass), and an unresolvable entrypoint is a violation, not a skip. 9/9 green locally and in CI.
    • Produced fixture configs validate against the v2 schema — tests/fixture-config-schema.test.ts produces configs through the real PluginConfigEditor (created default, splices into rich v2 configs, legacy-tolerated no-ops, jsonc variants) and validates them, plus the README quick-start snippet, against the pinned Config.Info; v1-shaped configs and malformed entries are rejected. 8/8 green locally and in CI.
    • Open empirical items from C1 are resolved and recorded — docs/reference/opencode-v2-facts.md §14 rewritten with per-item dispositions: §14.6 settled (root-index entrypoint fallback must not be relied on — dead on Bun 1.3.x where ResolveMessage is not an Error, working on Bun ≥1.4.2/Node; exports["./server"] is the deterministic path and was added to package.json — this run's own CI caught the first over-pinned claim and the record now carries both runtime observations), §13 row 9 added, §7 amended; items 1,2,3,4,7,8 recorded as not reachable from a plugin-package harness (they need the unpublished core host); item 5 partially confirmed at the pinned shapes.
    • Harness runs in CI and is green — dedicated V2 verification harness job; green on the PR head: https://github.com/Expert-Vision-Software/opencode-architect/actions/runs/37481748765 (Typecheck & Test ✓, V2 verification harness ✓).

    Implemented in #35.

  3. added a commit that references this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions