Skip to content

Composite conformance: test cross-host auto-discovery and precedence, not only file collisions #651

Description

@ScriptedAlchemy

Scope

Focused conformance/hardening slice of #555 and #592, derived from the Ponytail composite-plugin reference. This is a test/contract gap to close, not a claim that a newly reproduced failure exists in every currently supported host.

Reference evidence

Ponytail at 974d940a1c5344210874150b98ff0d2c861fab6a deliberately keeps its Claude/Codex hooks at hooks/claude-codex-hooks.json, referenced by the two native manifests. Its Gemini regression test explicitly requires hooks/hooks.json to be absent, because that conventional path would be auto-discovered as Gemini hooks. The files need not collide for one projection to alter another host's behavior.

Pinned reference files:

This reference supplies a failure pattern, not proof that Agent Bundle supports Gemini or that its host contracts can be copied without verification.

Existing implementation to preserve

At Agent Bundle 75c5f46f947f8a4cc90ac5d843d53d421dec8a44, packages/agent-bundle/src/build/compose.ts already provides:

  • AB4103 for conflicting entries at one artifact path;
  • AB4105 for target-scoped command/rule leakage through shared conventional directories;
  • deterministic projection/entry ordering.

Do not replace these with another compatibility subsystem. Extend the existing adapter contracts and composition tests only where the additional behavior needs representation.

Required invariant

For the same authored application and supported selection, adding host B must not cause host A to auto-load B-only hooks, instructions, commands, or fallback manifests, nor shadow A's intended binding. Test the effective discovered surface, not only the existence of expected files or the validity of each JSON document in isolation.

A composite result must preserve each selected host's intended behavior or fail before publication with a precise incompatibility diagnostic. Never repair the test by silently widening a component's targets.

Implementation/checklist

  • Audit the shipped adapters' pinned discovery/precedence contracts: explicit pointers, conventional fallback paths, replacement versus additive discovery, and root-manifest precedence. Reuse existing contract data; add only missing facts.
  • Extend packages/agent-bundle/tests/build-compose.test.ts and existing host-contract/install proofs with negative discovery assertions. Preserve AB4103/AB4105 coverage.
  • Add a small synthetic adapter fixture reproducing the pattern: A explicitly references its hook document, B auto-discovers a different conventional path, and adding that path changes B's effective hooks. Label it synthetic, not a native-host proof.
  • Cover supported combinations and reversed target ordering. Retain explicit rejection for combinations that cannot preserve native semantics; do not claim support from a successful file merge.
  • Assert both required bindings and forbidden discovery. Where a native contract supports explicit paths, exercise them; do not arbitrarily rename fixed host paths or globally ban hooks/hooks.json.
  • Inspect/manifest output records the actual bindings through the canonical projection/executable records, without a parallel discovery catalog. Diagnostics identify the affected hosts, component, and discovery/precedence rule.
  • Re-run the relevant discovery assertions against relocated and packed copies using the existing integration harness. Absence guarantees must survive packaging too.

Boundaries and dependencies

Use #555's composite assembly and #604's manifest contract where available. Test-only coverage can start independently; adapter-schema changes require pinned host evidence and their normal review. No new host support, host-name conditionals in plugin source, universal discovery interpreter, or new public configuration is required by this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthost-integrationAgent host capabilities, projection, discovery, and lifecyclemeta-frameworkAgent Bundle compiler-coupled meta-framework

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions