Skip to content

feat(secrets): resolve intent-declared project slugs to prj_… ids - #603

Merged
adampullely merged 1 commit into
mainfrom
feat/project-slug-resolution
Aug 2, 2026
Merged

feat(secrets): resolve intent-declared project slugs to prj_… ids#603
adampullely merged 1 commit into
mainfrom
feat/project-slug-resolution

Conversation

@adampullely

Copy link
Copy Markdown
Contributor

Headless bootstrap runs authenticate with workspace-scoped ORUN_TOKENs, which cannot write repo links; project scope then comes from intent.yaml — a SLUG — and config-surface routes 404 on slugs (Route not found: …/projects/ambient/config/secrets, hit live on the ambient run).

  • configsurface.ListProjects + ResolveProjectID (slug→prj_…, per-org cache, prj_… passthrough, actionable unknown-project error listing available slugs).
  • secretsRuntime.projectID()": lazy memoized resolution on --project", default-to-project, and --env paths — linked repos (already ids) take zero extra calls.

Verified headless with a workspace sk_ token: orun secrets list --org ws_91J9CD5W --project resolves ambient→prj_641d… and answers; full create-secrets.sh --dry-run passes.

🤖 Generated with Claude Code

Config-surface routes take project ids only. A repo link stores the id,
but headless runs with workspace-scoped tokens cannot write links — they
resolve the project from intent.yaml, which declares the SLUG, and every
project-scoped secrets call 404'd.

- configsurface: ListProjects (GET …/{org}/projects) + ResolveProjectID
  (slug→prj_… with per-org memoization; prj_… passes through).
- secretsRuntime: lazy projectID() resolution on the three project-scoped
  paths (--project, default-to-project, --env).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
adampullely added a commit to sourceplane/lumen that referenced this pull request Aug 2, 2026
…preflight heals it (#66)

Headless runs authenticate with workspace-scoped tokens, which may not
write repo links; project-scoped commands then resolve the project from
the intent, which never declared one — phase 03 died with 'this repo
isn't connected' right after a passing preflight.

- scaffold: write `project: <repoName>` beside `workspace:` in
  execution.state.
- preflight: the silenced `cloud link` failure now says so out loud; and
  when intent.yaml lacks `project:`, heal it (insert + push to main via
  push-main.sh) so pre-existing products work headless too.

Needs orun ≥ v2.52.2 (project slug→id resolution, sourceplane/orun#603).

Co-authored-by: Rahul Varghese <rahul.varghese@sourceplane.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@adampullely
adampullely merged commit a41a584 into main Aug 2, 2026
8 checks passed
adampullely pushed a commit to sourceplane/ambient that referenced this pull request Aug 2, 2026
…ed intent project

v2.49.0 predates slug->prj resolution (sourceplane/orun#603/#606); with
project: declared in intent.yaml every lane 404'd as 'repo isn't
connected'. Same bump as lumen#68.
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