Skip to content

Remove IncomingSite, muck with config less in the intermediate layers#361

Merged
nbrownus merged 9 commits intomainfrom
worktree-site-simplification
Mar 5, 2026
Merged

Remove IncomingSite, muck with config less in the intermediate layers#361
nbrownus merged 9 commits intomainfrom
worktree-site-simplification

Conversation

@nbrownus
Copy link
Contributor

@nbrownus nbrownus commented Mar 3, 2026

Alternative approach to #358 for config shenanigans

This adds support for full yaml import.

@nbrownus nbrownus force-pushed the worktree-site-simplification branch from 37c0691 to 52a467e Compare March 3, 2026 03:22
@nbrownus nbrownus force-pushed the worktree-site-simplification branch 4 times, most recently from 4ec4a6c to 9f23c65 Compare March 5, 2026 05:21
JackDoan
JackDoan previously approved these changes Mar 5, 2026
@nbrownus nbrownus marked this pull request as ready for review March 5, 2026 18:53
nbrownus and others added 8 commits March 5, 2026 15:35
Remove jsonTrue type that always marshaled to true, change site.Managed
to plain bool. This fixes a bug where unmanaged sites were incorrectly
becoming managed during v0→v1 migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Native save functions (saveSiteToDisk in Swift, saveSite in Kotlin) now
stamp configVersion = 1 on write. Dart default changed from 1 to 0 since
native always overrides it on save.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go tests (nebula/mobileNebula_test.go):
- TestMigrateConfig: verify unmanaged v0 site stays unmanaged (the bug fix)
- TestMigrateConfig_ManagedSite: verify managed v0 site stays managed
- TestMigrateConfig_ConfigVersion: verify migrated config has configVersion 1
- TestMigrateConfig_KeyStripped: verify pki.key removed from rawConfig
- TestMigrateConfig_ManagedWithRawConfig: test migration of managed site
  with existing YAML rawConfig from old DN-enrolled flow

Dart tests (test/models/site_test.dart):
- configVersion defaults to 0 for new sites (native stamps 1 on save)
- configVersion round-trips through toJson
- fromYaml produces default configVersion 0
- managed flag defaults and serialization
- Fix existing test expecting configVersion 1 (now 0)

CI: Add .github/workflows/gotest.yml to run Go tests on PRs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nbrownus nbrownus force-pushed the worktree-site-simplification branch from 62dd998 to c3cd4d0 Compare March 5, 2026 21:36
JackDoan
JackDoan previously approved these changes Mar 5, 2026
@nbrownus nbrownus force-pushed the worktree-site-simplification branch from c780448 to e399492 Compare March 5, 2026 22:05
@nbrownus nbrownus merged commit 4f6d94d into main Mar 5, 2026
8 checks passed
@nbrownus nbrownus deleted the worktree-site-simplification branch March 5, 2026 22:20
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