Skip to content

chore(main): release 7.181.3 - #2786

Merged
zaxbysauce merged 1 commit into
mainfrom
release-please--branches--main--components--opencode-swarm
Sep 15, 2026
Merged

zaxbysauce merged 1 commit into
mainfrom
release-please--branches--main--components--opencode-swarm

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Instruction selection and caching with paired outcome evidence (#2672)

What changed

  • The architect knowledge-injector's context cache key now includes a
    payload-input fingerprint covering every input the cached instruction text
    embeds: the curator briefing, rejected lessons, the run-memory summary,
    recent escalations, and the latest curator drift report (each read once per
    invocation and shared with the assembly path). Previously a changed
    briefing or drift report was re-served stale while the conversational
    context was unchanged; now any instruction-set change invalidates the
    cache. Unrelated event-file churn does not invalidate (escalation content
    is hashed, not file stamps).
  • New paired cached-vs-uncached evaluation:
    /swarm memory evaluate --instruction-pairing runs deterministic offline
    tasks through the real injector hook on a cold cache (regeneration
    reference) and a warm cache replaying identical context, reporting per pair
    the quality outcome (which directive labels survived selection), per-arm
    latency, cache reads, uncached cost, and the rendered prefix length at the
    host-renderable carrier boundary. The durable report lands at
    .swarm/memory/instruction-pairing-report.json. Negative results are
    retained rows (negative_result: true when caching did not improve the
    paired quality outcome), and the report deliberately contains no
    percentage or savings fields — every quantity names its measurement
    denominator. The report's instruction_set_digest is the handle a
    HarnessOpt lineage record ([Workstream F] PR 11 of 21: Ship the governed HarnessOpt capstone with held-out validation #2503, the governed held-out comparison owner)
    can reference; this command feeds that harness evidence without
    duplicating it.
  • New measured reachability dispositions for the six bundled skills named by
    the issue (ci-failure-batching, gate-attribution,
    merge-queue-readiness, skill-edit-validation,
    worktree-retry-cleanup, parallel-work-check) in
    src/config/bundled-skill-dispositions.ts: all six are reachable with
    verified consumer references (including the Claude-side commit-pr and
    editing-skills adapters, which previous closure scans did not visit).
  • Six named consumer-control tests plus guards: a skill with no references
    and no retirement fails the control (a missing literal search hit can
    never delete a skill), and retirement requires full inventory parity. The
    bundled-skill runtime-closure test now scans all consumer trees
    (.opencode, .claude, .agents, src), closing the scan-root gap.
  • Docs: the instruction cache key and invalidation inputs, the pairing
    measurement denominators, and the six-skill disposition table
    (docs/configuration.md, docs/skills.md, docs/commands.md).

Why

Instruction-selection and cache behavior shipped without paired outcome
evidence, the instruction cache could serve a superseded instruction set
after its inputs changed on disk, and bundled-skill consumption was asserted
only by inventory lists and a closure scan rooted at .opencode/skills
that missed two consumer trees. Issue #2672 (Workstream E PR 09 of 09)
required all three to be measurable and guarded.

How to use it

Nothing to configure. Run /swarm memory evaluate --instruction-pairing for
the paired report; the injector cache now invalidates automatically when any
embedded instruction input changes. Skill dispositions are verified by the
consumer controls on every test run — retiring a skill remains a deliberate,
full-parity act.

Caveats

  • On the offline deterministic corpus both pairing arms run the same
    selection algorithm, so quality_outcome is identical by design — the
    honest negative result the issue contract asks to retain; latency and cost
    deltas carry the efficiency signal in absolute milliseconds.
  • The fingerprint adds bounded reads (briefing/rejected/run-memory/
    escalations/drift) to the cache-hit path; the paired report quantifies the
    remaining cache benefit rather than assuming it.

fix(agents): validate final enabled swarm model selections and fallbacks during preflight

Issue: #2680

What

  • The model preflight now validates the final effective model selection of every enabled role — legacy unprefixed and multi-swarm prefixed (swarms.<id>.agents.<role>.model) — by reusing the shipped exact-name resolution helpers, instead of only reading top-level agents overrides plus a blanket DEFAULT_MODELS pass that missed per-swarm overrides and warned about roles that cannot dispatch.
  • Disabled roles and feature-gated optional roles (council.*, docs_design, designer while their flags are off) are never collected, so preflight warnings carry no consumer-default noise; primary (architect) roles classify as host-controlled and stay silent — OpenCode's UI owns their selection.
  • New distinct bounded outcome classes with actionable diagnostics: missing-selection (enabled role with no final selection — catalog-independent) alongside the existing provider/model unresolved classes; explicit fallback_models entries are validated as their own recorded class and are never synthesized.
  • Dispatch admission now covers every registered swarm agent, not just critics: a Task dispatch whose final selection is positively unresolved is denied with SWARM_AGENT_MODEL_UNRESOLVED (critics keep the PLAN_CRITIC_MODEL_UNRESOLVED identity); a role with no final selection is denied with SWARM_AGENT_MODEL_MISSING_SELECTION. Primary agents are exempt (short-circuit before any catalog lookup) and an unreachable catalog never denies a dispatch — a catalog warning alone is not dispatch-failure evidence.
  • /swarm doctor reports failing selections with configured/enabled/resolved/fallback distinctions and per-class operator actions (bounded to 20 rows).

Why

A per-swarm model override pointing at a missing provider or model was invisible to every preflight surface: the startup warning stayed silent, /swarm doctor missed it, and the first observed failure was a permanent dispatch error with no typed preflight class. The #2271 preflight was built for top-level-config-only deployments and never followed multi-swarm generation.

Notes

  • collectConfiguredAgentModels remains exported unchanged for compatibility; runModelPreflight accepts an optional options object carrying the live generated-name registry.
  • The deferred catalog fetch stays bounded (2 s timeout, 30 s TTL cache) and fail-open; no network call was added to plugin startup.
  • Issue [Workstream H] PR 11 of 15: Refuse unregistered lane agents at dispatch time (bare canonical roles on multi-swarm hosts) #2614's unregistered-lane dispatch refusal is untouched.
  • Documentation: new "Model preflight" section in docs/configuration.md covering configured vs enabled vs resolved vs fallback, prefixed names, optional-role gating, and operator actions.

🤖 I have created a release beep boop

7.181.3 (2026-09-15)

Bug Fixes

  • agents: validate final enabled swarm model selections and fallbacks during preflight (#2680) (64a7f64)
  • agents: validate final enabled swarm model selections during preflight (#2680) (0f75c2d)
  • ci: register the pairing-report stream and canonicalize test tmpdirs (#2672) (4bea76b)
  • knowledge: pair instruction-selection evidence and close cache/consumer gaps (#2672) (8dbab19)
  • memory: resolve PR #2781 review findings PRR-001..016 (5039c3c)
  • memory: satisfy G2 cache-invalidation scan and #2526 system-role ratchet (#2672) (40afb4f)
  • review: close PR #2782 review findings (sanitize sinks, class alignment, cache epoch) (616bd9a)
  • tests: complete mocked bindings for the widened memory-barrel graph (#2672) (0c4d07d)
  • tests: make consumer-control path check POSIX-portable (#2672 final-critic F2) (5bb5338)

This PR was generated with Release Please. See documentation.

@github-actions
github-actions Bot force-pushed the release-please--branches--main--components--opencode-swarm branch from 7a480f0 to f88160f Compare September 15, 2026 05:03
@github-actions

Copy link
Copy Markdown
Contributor Author

Drift check report

Found 2 drift finding(s): 0 error, 0 warning, 2 notice.

required-check-contract (2)

  • 🔵 notice scripts/required-check-contract.json: [RULESET_DIVERGENCE] intended-required context "drift" is not yet required by the captured ruleset
  • 🔵 notice scripts/required-check-contract.json: [RULESET_DIVERGENCE] intended-required context "drift" is not present for every expected event in captured external workflow evidence

@zaxbysauce
zaxbysauce added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit 7aa8b9f Sep 15, 2026
34 checks passed
@github-actions

Copy link
Copy Markdown
Contributor Author

🤖 Created releases:

🌻

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