Skip to content

fix(loop): a stale contractSync path makes every guard report current #298

Closed

Description

@sydevs-bot

Summary

contractSync.consumers.<repo>.paths is the only thing the three contract guards look at. When a consumer moves its copy of a producer's contract, all three report success while the file that repo really builds from goes unchecked. Nothing notices until someone changes the config by hand.

Approach

Extend audit-contracts step 2 (workflow/skills/audit-contracts/SKILL.md:39) so it also asserts that every contractSync.consumers.*.paths entry exists in that consumer's origin/main. A path that does not exist means the config lags the repo, and is reported and fixed exactly like stale drift: a loop-config.json PR here.

Where the three guards go quiet today:

  • .github/actions/contract-check/check.sh:23 — touched=$(git diff --name-only "$BASE_SHA" HEAD -- $paths). With paths naming a file the repo no longer has, touched is empty and the check exits 0 with No copied contract changed. A hand edit to the live copy passes, which is WeMeditateWeb#269's failure mode.
  • .github/workflows/dispatcher.yml, the contracts-sync job — git status --porcelain -- $SYNC_PATHS is clean on a path the sync command never writes, so the job prints Already current. Nothing to open. and the consumer stays stale.
  • workflow/skills/audit-contracts/SKILL.md:45 — the same clean git status reads as current.

Why the audit and not the check. docs/why.md#a-contract-check-checks-what-a-pr-changes rejects a check that fails a PR for drift that is not that PR's (WeMeditateWeb#310), and assigns drift on main to the sync and this audit. Failing check.sh on an absent configured path would redden every PR in a consumer repo until the config caught up — the rejected shape, with a wider blast radius.

A skill edit here also bumps version in workflow/.claude-plugin/plugin.json, per AGENTS.md.

Acceptance criteria

  • audit-contracts step 2 asserts every contractSync.consumers.*.paths entry exists in that consumer's origin/main, and names the repo and the path when one does not.
  • A missing path is handled as drift here, in a loop-config.json PR, never by failing a consumer's CI.
  • version in workflow/.claude-plugin/plugin.json is bumped in the same PR.
  • The rule names no path and no repo: both come from loop-config.json.

Verification checklist

  • claude plugin validate ./workflow --strict && node --test workflow/lib/*.test.mjs passes.
  • node workflow/lib/rule-delta.mjs --base origin/main workflow/skills — every removal named in the PR body.
  • In a clone of a consumer on origin/main, with one paths entry edited to a path that repo does not have, the new assertion names that repo and path. Restore the entry afterwards.

Notes

Activity

  1. added theissue type on Nov 21, 2026
  2. Ardnived commented on Nov 21, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  3. added
    bot:working
    on Nov 21, 2026
  4. sydevs-bot commented on Nov 21, 2026

    @sydevs-bot
    ContributorAuthor

    🤖 no session running
    approved by Ardnived

    recent dispatches
    • 12:53Z implement · attempt 2 · session · done
    • 12:53Z implement · attempt 2 · session
    • 02:17Z implement · attempt 1 · session · timed out
    • 02:17Z implement · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  5. moved this from Awaiting to Working in SYDevelopers Technical Roadmapon Nov 21, 2026
  6. added
    bot:working
    and removed
    bot:working
    on Nov 21, 2026
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

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions