Skip to content

fix(amp): replace the impossible phx-watch-pr install command - #137

Merged
oliver-kriska merged 1 commit into
mainfrom
fix/amp-watch-pr-install-command
Aug 18, 2026
Merged

fix(amp): replace the impossible phx-watch-pr install command#137
oliver-kriska merged 1 commit into
mainfrom
fix/amp-watch-pr-install-command

Conversation

@oliver-kriska

Copy link
Copy Markdown
Owner

Summary

Post-merge fixes for #132, from an Amp review of the merged main plus one
issue found while verifying it.

1. The watcher install command could never have worked

README and docs/amp.md both told users to run:

amp plugins add https://raw.githubusercontent.com/.../phx-watch-pr.ts --target workspace

Amp rejects this outright (verified on 0.0.1787045288):

Error: For now, only https://ampcode.com/@amp/plugins/*.ts and
https://ampcode.com/@amp/plugins/*.ts URLs are allowed.

Nothing is written. docs/amp.md already contradicted itself — 390 lines below
the install block it states Amp "restricts amp plugins add ... to Amp-hosted
plugins" and hands out an atomic curl for elixir-phoenix.ts. The install
instruction was the wrong half of that contradiction.

Both call sites now use the same curl + mv pattern against the standalone
repository's stable branch. Verified end to end: the documented command
fetches 43,318 bytes byte-identical to targets/amp/plugins/phx-watch-pr.ts.
The update section now loops over both plugins instead of only the workflow one.

2. The phx-watch-pr harness was one second from red

It ran with a 60s subprocess timeout and takes ~59s wall for ~3s CPU: the
harness drives a fake clock with real 80ms flushes, and advance() performs up
to 21 of them across 23 calls. Three consecutive local runs took 58.9s, 60.4s,
and 73.9s
— a required check passing or failing on runner load alone, which
would have started blocking unrelated PRs.

Raised to 240s. The harness is unchanged; shortening the flush would trade a
timeout flake for a race.

3. Paragraph join

Fixes a missing blank line in README introduced when the watch-pr block was
merged forward in #132.

Verification

make ci246 passed, all five manifests validated, all four generated
targets drift-clean, snapshots match, eval passed (51 skills avg 0.990, 26
agents 1.000).

Not in this PR

  • The standalone distribution is stale: amp-elixir-phoenix stable still
    serves the pre-compaction 98,905-byte elixir-phoenix.ts (canonical is
    95,191, under the 96,000 transport budget) and three skills differ. Needs a
    fresh sync from 7c613bd.
  • Notify Docs Site fails with Bad credentials (401) — SITE_DISPATCH_TOKEN
    is invalid or expired and needs regenerating, not rescoping.

README and docs/amp.md told users to install the watcher with `amp plugins
add` against a raw.githubusercontent.com URL. Amp rejects that outright:

  Error: For now, only https://ampcode.com/@amp/plugins/*.ts and
  https://ampcode.com/@amp/plugins/*.ts URLs are allowed.

Verified on Amp 0.0.1787045288. Nothing is written, so the documented path
to the watcher never worked for anyone.

docs/amp.md already contradicted itself about this: 390 lines below the
install block it states that Amp "restricts `amp plugins add` ... to
Amp-hosted plugins" and hands out an atomic curl for elixir-phoenix.ts. The
install instruction was simply the wrong half of the contradiction. Both
call sites now use that same curl + mv pattern against the standalone
repository's stable branch, verified to fetch bytes identical to the
canonical target. The update section loops over both plugins rather than
only the workflow one.

Also raises the phx-watch-pr harness subprocess timeout from 60s to 240s.
The harness drives a fake clock with real 80ms flushes -- advance() runs up
to 21 per call across 23 calls -- so it spends ~59s waiting for ~3s of CPU.
Consecutive local runs took 58.9s, 60.4s, and 73.9s, so a required check
was passing or failing on runner load alone. The harness is unchanged;
shortening the flush would swap a timeout flake for a race.

Fixes a paragraph-join in README introduced when the watch-pr block was
merged forward in #132.
@oliver-kriska
oliver-kriska merged commit 8d9bdd6 into main Aug 18, 2026
6 checks passed
@oliver-kriska
oliver-kriska deleted the fix/amp-watch-pr-install-command branch August 18, 2026 10:57
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.

1 participant