Skip to content

fix(migration): detect v0.9 artifacts before FindNSelfRoot fails#85

Open
acamarata wants to merge 5 commits intomainfrom
fix/migration-v09-detection-order
Open

fix(migration): detect v0.9 artifacts before FindNSelfRoot fails#85
acamarata wants to merge 5 commits intomainfrom
fix/migration-v09-detection-order

Conversation

@acamarata
Copy link
Copy Markdown
Collaborator

Summary

  • nself start and nself build called FindNSelfRoot before checking for v0.9 artifacts
  • A v0.9 directory has no .env marker, so FindNSelfRoot always returned "no nself project found" — the v0.9 detection code was never reached
  • Fix: probe cwd for v0.9 artifacts in the FindNSelfRoot error path and emit the correct block message (or --allow-legacy warning) before falling back to the generic error

Test plan

  • nself start in v0.9-fixture: outputs "v0.9 project detected" and exits non-zero
  • nself start --allow-legacy in v0.9-fixture: outputs "WARNING: v0.9 project detected … --allow-legacy" and proceeds
  • nself build in v0.9-fixture: outputs "v0.9 project detected" and exits non-zero
  • All verified locally against internal/migration/testdata/v0.9-fixture
  • Builds cleanly with NSELF_DEV_BUILD=1

Chain-ID: ebf13772 — unblocks v1.0.15 Migration Fixture CI gate

acamarata added 4 commits May 3, 2026 14:30
…ation

The SDK publishing and test workflows (sdk-ts-publish.yml, sdk-py-publish.yml,
sdk-flutter-publish.yml, sdk-flutter-pr.yml, sdk-reverse-dep-check.yml) were
still using the old 'cli/sdk/<lang>' path prefix in shell commands. Since the
SDKs moved into cli/sdk/{go,py,ts,flutter} during P96 S33, and these workflows
run in the cli repo root, the working directory references should be just
'sdk/<lang>', not 'cli/sdk/<lang>'.

Fixes: Release workflow failures on v1.0.15 tag (Chain-97b43edf)
…h filter

publish-sdk-nchat.yml: the nchat SDK directory does not exist in this
repo yet, causing every v* release to fail with cd: nchat: No such
file or directory. Add an if: hashFiles guard so the job skips
gracefully instead of erroring. The guard self-removes once the SDK
is scaffolded.

sdk-flutter-pr.yml: paths filter used 'cli/sdk/flutter/**' which never
matches any file (paths are relative to repo root, so the correct form
is 'sdk/flutter/**'). The PR gate silently never triggered on flutter
SDK changes.

Fixes: Chain-b4357ed6 (v1.0.15 SDK publish CI failures)
Ref: Chain-eb9b7c1c (v1.0.13 original report, OIDC root cause)
The Migration Fixture workflow runs 'make build' to test the CLI binary
against a v0.9 test fixture. However, the binary was panicking at init
because the license pubkey was not injected (SEC-10 guard).

The SEC-10 guard is by design: production binaries require either:
1. The pubkey injected via goreleaser ldflags (production), OR
2. NSELF_DEV_BUILD=1 environment variable (development/testing)

The workflow was missing the dev-build environment variable, causing
the license init to panic.

Fixes: CLI v1.0.15 Migration Fixture workflow failure
Chain-ID: ebf13772
nself start and nself build called FindNSelfRoot before checking for v0.9
artifacts. A v0.9 directory has no .env marker, so FindNSelfRoot always
failed with "no nself project found" — the v0.9 error was never reached.

Fix: probe cwd for v0.9 artifacts in the FindNSelfRoot error path, emit
the correct v0.9 block (or --allow-legacy warning) before falling back
to the generic no-project error. Verified against v0.9-fixture locally.

Chain-ID: ebf13772
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview, Comment May 4, 2026 5:51am

Request Review

…steps

The license module init() function requires NSELF_DEV_BUILD=1 at runtime to
skip the pubkey injection panic in dev builds. The workflow set this env var
only for the build step, causing all subsequent steps that invoke the nself
binary to panic. Added env var to all 5 test steps that execute the binary.

Fixes Chain-17ccd33d.
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