Skip to content

Ship contract/fixtures in a published package so consumers can conform instead of hand-mirroring #359

Description

@khaliqgant

Problem

Path Contract v1 (#357, merged) makes this repo the owner of the path grammar, with 58 language-neutral fixtures in contract/fixtures/. Phase 2 consumers (cloud, relayfile-cloud, relayauth, relayfile-adapters) are supposed to conform to those fixtures rather than reimplement the rule.

They currently cannot. contract/ sits at the repo root, outside every published npm package — @relayfile/client, @relayfile/core, and the rest all exclude it via their files lists. So a TS consumer has no way to import the corpus.

The practical consequence today: cloud has a CI gate (cloud#2732) that hand-mirrors the grammar in a local script. That is precisely what cloud's own source-of-truth rule forbids, and the script header already commits to deleting itself once the fixtures are consumable. Every other Phase 2 consumer faces the same choice — hand-mirror or skip the gate — and hand-maintained agreement is the exact drift mechanism that produced cloud#2297 in the first place.

Ask

Publish contract/fixtures/*.json (and ideally the reference scopePathValid / scopePathMountRoot semantics as data) in a consumable package. Either:

  • add contract/ to an existing package's files (e.g. @relayfile/core), or
  • a dedicated @relayfile/contract package — cleaner, since the corpus is language-neutral and has no runtime dependency on the client or core.

Versioned, so a consumer can pin a contract version and a bump is a visible, reviewable event rather than silent drift.

Why it is worth doing now rather than later

The contract only functions as a contract if the implementations that must satisfy it can execute it in their own CI. Until then it is a document that one repo tests against itself, and the other four keep their private theories of what a path means — which is the condition the whole stabilization program exists to end.

Once shipped, cloud#2732's local grammar rule gets deleted and replaced by fixture consumption; the other consumers can gate the same way.

Related: cloud#2738 (Phase 2 divergence map), cloud/specs/relayfile-path-contract-stabilization.md, cloud#2732.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions