Skip to content

Add ampcode (Amp CLI) — DRAFT, proprietary + unscannable - #510

Draft
bryan-minimal wants to merge 2 commits into
mainfrom
bryan/ampcode-import
Draft

Add ampcode (Amp CLI) — DRAFT, proprietary + unscannable#510
bryan-minimal wants to merge 2 commits into
mainfrom
bryan/ampcode-import

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

The Amp CLI, from the ampcode/homebrew-tap formula via pkgmgr import homebrew.

Draft on purpose. This package is honest about two things a reviewer must decide — not two things the tooling failed to work out.

Both TODOs are resolved in the file, not left open

CPE — searched, none exists. NVD keywordSearch=ampcode returns 0 results. There is no CPE identity for Amp, so the package is unscannable by construction, not by omission.

sourcegraph returns 462 CPEs — but every one is sourcegraph:sourcegraph, the code-search product. A different product. Attaching it would import another product's CVEs as false positives, so it's deliberately not done. That over-match is a failure mode we've spent real time cleaning up.

Terms — read, and they're restrictive. ampcode.com/terms grants a "limited, revocable, non-exclusive, non-transferable, non-sublicensable" licence. Redistribution is not permitted.

So the package fetches direct from static.ampcode.com and is never mirrored to gs:// — the same shape chromium-bin uses against Google's and Playwright's CDNs. 210 of our 533 sources already fetch direct, so this isn't novel.

No provenance, on purpose

A vendor CDN URL yields none, and fabricating a plausible one is exactly how chromium-bin came to name microsoft/playwright for an artifact served out of Google's bucket. Omission is honest; a wrong owner/repo is worse than nothing.

The repo-wide bit — the reason this is separate

Requires stdlib 0.0.18 for the redistributable attr class (minimal#861), hence the minimum_version bump. Attrs is a closed allowlist, so on an older stdlib this fails Nickel eval for the entire repo — I hit that, and it took out an unrelated sibling package's build. Buildbot is confirmed on 0.0.18.

⚠️ Nothing in minimal reads the attr yet (#861 is schema + docs), so today it records the constraint rather than enforcing it. Our binary cache is not yet mechanically prevented from carrying this artifact.

Two operational facts before merging

  • Artifacts are ~111 MB each, ~222 MB per version across both arches, and the version is a unix timestamp that bumps on essentially every release — it moved twice while this PR was being prepared.
  • runtime_deps is a discovery-mode guess of [glibc]. A 111 MB binary is likely a Node SEA or Bun-compiled blob; only a --from-build DT_NEEDED scan will tell the truth. Blocked on local build tooling (see below).

Not yet built locally

mip (the package/build CLI) has no macOS artifact and doesn't compile on darwin — crates/mip/src/main.rs gates mod cmd_run on target_os = "linux" but leaves three call sites ungated. Investigating the correct build path separately; buildbot is the validation here.

🤖 Generated with Claude Code

The Amp CLI, from the ampcode/homebrew-tap Homebrew formula, via
`pkgmgr import homebrew`.

Draft on purpose. This package is honest about two things that a
reviewer must decide, not two things the tooling failed to work out.

BOTH TODOs ARE RESOLVED IN THE FILE, not left open:

- CPE: NVD keywordSearch=ampcode returns ZERO results. No CPE identity
  exists for Amp, so there is nothing to attach — the package is
  unscannable by construction, not by omission. `sourcegraph` returns
  462 CPEs but every one is `sourcegraph:sourcegraph`, the code-search
  product, a DIFFERENT product; attaching it would import another
  product's CVEs as false positives, so it is deliberately not done.
- TERMS: ampcode.com/terms grants a "limited, revocable, non-exclusive,
  non-transferable, non-sublicensable" licence. Redistribution is NOT
  permitted. The package therefore fetches DIRECT from
  static.ampcode.com and is never mirrored to gs:// — the same shape
  chromium-bin uses against Google's and Playwright's CDNs.

No source_provenance is emitted. A vendor CDN URL yields none, and
fabricating a plausible-looking one is how chromium-bin came to name
microsoft/playwright for an artifact served out of Google's bucket.
Omission is honest; a wrong owner/repo is worse than nothing.

Requires stdlib 0.0.18 for the `redistributable` attr class
(minimal#861), hence the minimum_version bump — that is a repo-wide
change and the main reason this is a separate PR. Note nothing in
minimal READS the attr yet, so today it records the constraint rather
than enforcing it.

Two operational facts worth knowing before merging:
- The artifacts are ~111 MB each, ~222 MB per version across both
  arches, and the version is a unix timestamp that bumps on essentially
  every release (it moved twice while this was being prepared).
- runtime_deps is a discovery-mode guess of [glibc]. A 111 MB binary is
  likely a Node SEA or Bun-compiled blob; only a --from-build DT_NEEDED
  scan will tell the truth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 043f5984-8a01-4263-8961-4ad535fe0b87

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bryan/ampcode-import

Comment @coderabbitai help to get the list of available commands.

@jtnkminimal jtnkminimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVED FOR TESTING + DRAFT ONLY

The previous revision said nothing in minimal reads `redistributable`,
so the attr recorded a constraint rather than applying one. That was
wrong, and wrong in the direction that matters: a reviewer would have
concluded the proprietary binary could still reach the shared cache.

build-servers#180 (merged 2026-07-21) enforces it. Specs with
`attrs.redistributable = false` are excluded from cache upload, exempt
from the cache-audit completeness invariant, and skipped in the closure
seal — unconditionally, so post-purge seals record absence rather than a
seal-blocking hole. Consumers build locally via the planner's index-miss
fallback.

minimal#861 DECLARES the attr; the buildbot is what ACTS on it. Reading
only the stdlib side is what produced the wrong conclusion.

So two independent mechanisms now cover the licence constraint, and the
file says so: the Source urls fetch direct from static.ampcode.com (the
artifact is never mirrored to gs:// at all), and the attr keeps it out
of the shared cache if it ever were.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

Correction — redistributable IS enforced. The PR body above says nothing in minimal reads the attr, so it records the constraint rather than applying one. That's wrong, and wrong in the direction that matters: it would lead a reviewer to conclude the proprietary binary could still reach the shared cache.

build-servers#180 merged 2026-07-21 and enforces it — specs with attrs.redistributable = false are excluded from cache upload, exempt from the cache audit, and skipped in the closure seal (unconditionally, so post-purge seals record absence rather than a seal-blocking hole). Consumers build locally via the planner's index-miss fallback.

minimal#861 declares the attr; the buildbot is what acts on it. I'd only read the stdlib side, which is how I got it backwards.

So two independent mechanisms now cover the licence constraint, and fa64565 says so in the file:

  1. the Source urls fetch direct from static.ampcode.com — the artifact is never mirrored to gs:// in the first place;
  2. redistributable = false keeps it out of the shared cache if it ever were.

Also confirmed: this package cannot be built locally on macOS at any shim version — redistributable needs stdlib 0.0.18 and the shim's stdlib is compiled into the binary. Buildbot is the validation here, which is why the minimum_version bump rides along.

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.

2 participants