Skip to content

feat(cloud): GET /cloud/deps/allowlist for the requirements picker - #70

Merged
WayforthOfficial merged 1 commit into
mainfrom
feat/deps-allowlist-endpoint
Jun 27, 2026
Merged

feat(cloud): GET /cloud/deps/allowlist for the requirements picker#70
WayforthOfficial merged 1 commit into
mainfrom
feat/deps-allowlist-endpoint

Conversation

@WayforthOfficial

Copy link
Copy Markdown
Owner

The tiny endpoint the editor contract (#69) depends on — gives Lovable a live data source for the requirements picker. Quick review.

What it does

GET /cloud/deps/allowlist{"packages": {name: [versions]}, "max_direct_deps": 20}, derived from the curated lockfile. Authenticated cloud_agents tier (same as the rest of /cloud/*), not flag-gated (read-only reference — testable now).

Hashes never reach the client — confirmed

You asked to confirm the hashes stay server-side. They do: the transform takes only versions.keys(), dropping the [sha256:…] values. Verified on the actual payload:

packages: 15 | max_direct_deps: 20
sample: {"anyio": ["4.14.1"], "beautifulsoup4": ["4.15.0"], "certifi": ["2026.6.17"], ...}
contains sha256? False

The transform is extracted to _allowlist_payload() so the no sha256 reaches the client unit test covers the exact code the endpoint serves (not a re-implementation). 3 tests, full suite 626.

Doc sync

Updates docs/agent-editor-frontend-contract.md (§2 + the flag-gating table) to mark the endpoint live rather than "to add".

With this merged, #69 + this endpoint go to Lovable together — the picker has its source, and the only remaining backend gate before the editor goes live is Step 4b (mirror + real build + the flag flip).

🤖 Generated with Claude Code

Serves the curated allowlist as name -> sorted versions for Lovable's requirements
picker. Hashes are a build-time integrity detail and are NEVER sent to the client —
the payload is only package names + installable versions (all the picker needs).

- Reuses services.agent_deps.load_lockfile(); transform extracted to _allowlist_payload()
  so the no-hashes guarantee is unit-tested on the exact code the endpoint serves.
- Authenticated cloud_agents tier, like the rest of /cloud/*. Not flag-gated (read-only
  reference) — testable now.
- 3 unit tests incl. the load-bearing 'no sha256 reaches the client'. Suite 626 passed.
- Updates the editor contract doc (#69): §2 + the flag-table now mark the endpoint live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to wayforth / wayforth-pr-70 June 27, 2026 21:06 Destroyed
@WayforthOfficial
WayforthOfficial merged commit 97b87df into main Jun 27, 2026
2 of 3 checks passed
@WayforthOfficial
WayforthOfficial deleted the feat/deps-allowlist-endpoint branch June 27, 2026 21:11
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