Skip to content

fix(proxy): make the pin-drift watcher self-resolving and key-aware (… - #178

Merged
ruvnet merged 1 commit into
ruvnet:mainfrom
viknesh-ai:fix/proxy-pin-drift-watcher
Sep 1, 2026
Merged

fix(proxy): make the pin-drift watcher self-resolving and key-aware (…#178
ruvnet merged 1 commit into
ruvnet:mainfrom
viknesh-ai:fix/proxy-pin-drift-watcher

Conversation

@viknesh-ai

Copy link
Copy Markdown
Contributor

#174)

META_PROXY_VERSION is already current — #175 moved it 0.7.2 -> 0.7.4, and 0.7.4 is meta-proxy-dist's latest release. The pinned Ed25519 key still verifies that release's SHA256SUMS, so the pin itself needs no change.

What is still broken is the watcher that filed #174. Its logic lived as inline shell in the cron workflow, where nothing exercised it, and four of its untested branches were wrong:

  • The issue title embedded both version numbers and doubled as the dedupe key, so any version movement broke the match and opened a second issue.
  • Nothing ever closed a resolved drift. meta-proxy pin drift — META_PROXY_VERSION (0.7.2) is behind meta-proxy-dist v0.7.3 #174 has asserted "pinned at 0.7.2" for days after the pin reached 0.7.4.
  • Every mismatch was reported as "behind". A pin running ahead of the latest release is the more dangerous case — install 404s on assets that were never published — and it got the exact opposite advice.
  • gh release list --limit 1 is newest-by-date, so a draft or prerelease would have us pinning users onto an RC.

It also never checked the signing key its own resolution text told maintainers to confirm. A rotated key is invisible to a version comparison; it surfaces as every proxy install --yes failing verification.

Move the decision into scripts/proxy-pin-drift.mjs with the gh and network calls injected, so the branches are testable offline. Titles no longer carry versions, an existing issue is retitled rather than duplicated, a resolved drift is commented and closed, and the pinned key is verified against both the pinned release and any release we are about to recommend.

The dedupe search still matches the old version-bearing titles, so the first scheduled run closes #174 rather than orphaning it. Verified against live meta-proxy-dist with gh stubbed: state=current, pinnedKey=true, closed #174.

…uvnet#174)

META_PROXY_VERSION is already current — ruvnet#175 moved it 0.7.2 -> 0.7.4, and
0.7.4 is meta-proxy-dist's latest release. The pinned Ed25519 key still
verifies that release's SHA256SUMS, so the pin itself needs no change.

What is still broken is the watcher that filed ruvnet#174. Its logic lived as
inline shell in the cron workflow, where nothing exercised it, and four of
its untested branches were wrong:

  - The issue title embedded both version numbers and doubled as the dedupe
    key, so any version movement broke the match and opened a second issue.
  - Nothing ever closed a resolved drift. ruvnet#174 has asserted "pinned at
    0.7.2" for days after the pin reached 0.7.4.
  - Every mismatch was reported as "behind". A pin running ahead of the
    latest release is the more dangerous case — install 404s on assets that
    were never published — and it got the exact opposite advice.
  - `gh release list --limit 1` is newest-by-date, so a draft or prerelease
    would have us pinning users onto an RC.

It also never checked the signing key its own resolution text told
maintainers to confirm. A rotated key is invisible to a version comparison;
it surfaces as every `proxy install --yes` failing verification.

Move the decision into scripts/proxy-pin-drift.mjs with the `gh` and network
calls injected, so the branches are testable offline. Titles no longer carry
versions, an existing issue is retitled rather than duplicated, a resolved
drift is commented and closed, and the pinned key is verified against both
the pinned release and any release we are about to recommend.

The dedupe search still matches the old version-bearing titles, so the first
scheduled run closes ruvnet#174 rather than orphaning it. Verified against live
meta-proxy-dist with gh stubbed: state=current, pinnedKey=true, closed ruvnet#174.
@ruvnet

ruvnet commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Reviewed and verified against live data. Merging.

Your verification note is now stale in the best possible way, and that made a better test than you could run. It says state=current, pinnedKey=true, closed #174 — true on 2026-08-13. Since then cognitum-one/meta-proxy-dist shipped v0.7.5 (2026-08-18) while the repo still pins 0.7.4, so the drift this watcher exists to catch is now real.

I ran run() against the live registry with a gh shim that permits reads and hard-refuses every write (issue create|edit|comment|close|reopen), so nothing was mutated:

pinned=0.7.4 latest=0.7.5 state=behind pinnedKey=true → updated #222

Every branch that mattered fired correctly:

Test suite: node scripts/proxy-pin-drift.test.mjs31 assertions, 18 named cases, all passing, one per claimed bug plus the ahead/rotation/unreachable-asset paths. (node --test reports "1 test" because the file uses its own runner — CI invokes it the right way at ci.yml:162.)

Also composes cleanly with #195, which merged an hour ago: the new runner-coverage gate recognises scripts/proxy-pin-drift.test.mjs as reached via ci.yml's node <path> form, so this PR does not trip it. Verified against current main.

Follow-up, not yours to fix here: the watcher now correctly reports a real drift that this PR deliberately does not resolve — the pin itself. I'm bumping META_PROXY_VERSION 0.7.4 → 0.7.5 separately, on the strength of the pinnedKey=true evidence above.

@ruvnet
ruvnet merged commit 4b888f3 into ruvnet:main Sep 1, 2026
ruvnet added a commit that referenced this pull request Sep 1, 2026
…s 0.4.12

cognitum-one/meta-proxy-dist shipped v0.7.5 on 2026-08-18; the pin stayed at
0.7.4, so "metaharness proxy install" downloaded a stale proxy and reported
success. That is exactly the drift #178's rewritten watcher is built to catch,
and running it against live data immediately reported:

  pinned=0.7.4 latest=0.7.5 state=behind pinnedKey=true -> updated #222

Safe to bump without re-pinning the key: the pinned META_PROXY_SIGNING_PUBKEY_PEM
was verified against the real SHA256SUMS of BOTH releases before changing
anything --

  pinned key verifies v0.7.4: true
  pinned key verifies v0.7.5: true

so this is a version move only, not a key rotation.

meta-proxy.test.ts asserts the pin literally. That assertion is a tripwire, not
an oversight -- it fired on this change and is updated deliberately in the same
commit, which is the whole point of having it.

474 passed / 2 skipped. Lockfile resynced; runner-coverage gate green.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01G2iAKhp4FGq2Ty5CFnj8mT
ruvnet added a commit that referenced this pull request Sep 1, 2026
…red on Windows

main has been failing on Node 20/windows and Node 22/windows since #178 merged:

  FAIL reads the pinned Ed25519 key out of the real meta-proxy.ts:
    The input did not match the regular expression /^-----BEGIN PUBLIC KEY-----\n/

meta-proxy.ts is not pinned to `eol=lf` in .gitattributes (which covers only the
draco corpus and a few golden fixtures), so a Windows checkout produces a CRLF
PEM and the LF-anchored assertion fails.

Production is NOT affected, verified rather than assumed: the PEM only ever
reaches crypto.createPublicKey(), is never string-compared or hashed, and
createPublicKey() accepts CRLF and LF alike (checked both). So the fix belongs
in the test's platform assumption, not in readPinnedPublicKey().

  simulated CRLF PEM:  OLD -> false, NEW -> true
  LF PEM:              NEW -> true (unchanged)

Root cause of it reaching main: #178 came from a fork, and fork PRs report no
checks on this repo, so its CI never ran. I merged it on local (Linux) verification
alone. The same blind spot applies to #195. Worth a follow-up on fork-PR CI.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01G2iAKhp4FGq2Ty5CFnj8mT
ruvnet added a commit that referenced this pull request Sep 2, 2026
…main

Unblocking so this can be reviewed on its merits.

ADR NUMBER: this PR claimed ADR-253, already taken on main by
ADR-253-arc-agi-3-chatgpt-harness (#220). Renumbered to 276 — 275 went to #233
in the same round, which is the second-order collision noted in #267 (two open
PRs converging on the same free number). References in packages/avo/README.md
updated too.

CONFLICTS (5), resolved individually rather than by taking a side:
- .github/workflows/ci.yml — BOTH additive and both kept. This PR appends
  `node scripts/avo-claim-gate.mjs` INSIDE the existing SOTA `run: |` block;
  main added a separate "Meta-Proxy pin-drift watcher gate (#174)" step from
  #178. Naive resolution would have dropped one or nested the step inside the
  run block; verified the reconstructed file parses and both survive.
- packages/avo/package.json — took this PR's 0.2.0 (a minor for the new
  release-claim gating). Main had 0.1.5, which I published earlier today; 0.2.0
  is ahead of the registry and free.
- docs/adrs/INDEX.md + ADR-251 doc — unioned and de-duplicated.
- package-lock.json — regenerated rather than hand-merged.

PRE-EXISTING DUPLICATES FOUND, NOT FIXED HERE (out of scope, on main today):

  ADR-148-barbarian-scholar-hybrid-escalation.md
  ADR-148-swebench-hybrid-escalation-router.md
  ADR-236-codex-local-brain-mcp-and-hooks.md
  ADR-236-swebench-domain-run-honest-null.md

Two duplicate ADR numbers are live on main right now. adr-index.test.ts does not
check for duplicate NUMBERS (only that each file is indexed and has the canonical
sections), and that suite never runs anyway (#264). Reported on #267.

Substance not yet reviewed — this PR touches publish.yml, ci.yml and CODEOWNERS,
so it needs a careful pass rather than a merge on green CI alone.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01G2iAKhp4FGq2Ty5CFnj8mT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

meta-proxy pin drift — META_PROXY_VERSION (0.7.2) is behind meta-proxy-dist v0.7.3

2 participants