Repository navigation
Organization apps: Recover db-first installations and report truthful readiness - #326
Conversation
Distinguish a declared managed Git checkout from a directory-only mount, and block readiness when its expected application runtime is missing or invalid. Keep explicit data-only modules valid and preserve existing access authority.
Complete db-first Mission Control installations through verified staging and exclusive descriptor-based publication, activating Git last. Preserve existing database identity and concurrent work through failure and rollback; fail closed on unsupported recovery platforms. Add native race, quarantine and integration regressions, and document the bounded recovery contract. Independent safety review findings were fixed and the follow-up review is clean.
|
Explicit review and publication handoff to @immakermatty. Ready candidate head: bd11091. Independent follow-up review is clean after both accepted rollback findings were fixed; focused materialization and clean resident checks pass. The PR body records the staged root-check provenance, full Launchpad evidence and Darwin-only recovery boundary. Please review and publish this change before the final canonical Organization install. Organization identity PR HumanAndMachine-ai/HumanAndMachine-ai_GEN3#112 is another prerequisite; Design System runtime HumanAndMachine-ai/design-system#2 and its Organization documentation PR HumanAndMachine-ai/HumanAndMachine-ai_GEN3#113 should be published together. Native launcher PR #325 is independent and all its provider checks passed. After publication, standard update/install and actual Launchpad Start/Open/Stop smoke remain required. This agent has not merged source changes or published private Personalspace data. |
Greptile SummaryThis PR adds truthful readiness reporting for missing managed checkouts and declared application runtimes, plus a Darwin-only recovery path that installs Mission Control app code around an existing validated database checkout.
Confidence Score: 4/5The implementation appears safe to merge from a correctness perspective, with the non-blocking caveat that its Darwin-only recovery behavior lacks execution in CI. The changed recovery and readiness paths are fail-closed and preserve database identity and concurrent content, but all substantive tests of the native macOS publisher are skipped by the jobs that run the project test suite. Files Needing Attention: package.json and the macOS test coverage for lazurio/core/repository-container-publisher-lib.mjs and lazurio/organization-install-lib.mjs
|
| Filename | Overview |
|---|---|
| lazurio/core/repository-container-publisher-lib.mjs | Adds Darwin-exclusive descriptor-pinned publication, snapshot validation, and conservative rollback around an existing database container. |
| lazurio/core/git-materialization-lib.mjs | Extends checkout materialization with repository-db-parent inspection, publication, and retained recovery staging. |
| lazurio/organization-install-lib.mjs | Detects eligible db-first installations, validates the canonical database, and recovers the Mission Control parent checkout. |
| lazurio/runtime/diagnostics-lib.mjs | Makes missing managed Git roots and unavailable declared application runtimes block Organization readiness. |
| lazurio/runtime/lazurio-update-lib.mjs | Reports managed directory-only checkouts as blocked instead of current. |
| package.json | Registers the native publisher suite, but the Darwin-only behavioral tests remain unexecuted by repository CI. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Explicit Organization install] --> B[Run managed repository convergence]
B --> C{Db-first Mission Control parent detected?}
C -- No --> D[Continue ordinary installation]
C -- Yes --> E{Darwin platform?}
E -- No --> F[Return unsupported-recovery blocker]
E -- Yes --> G[Validate parent layout and canonical db checkout]
G --> H[Clone app repository into staging]
H --> I[Verify app identity and db ignore policy]
I --> J[Publish app entries with exclusive descriptor-relative renames]
J --> K[Activate .git last]
K --> L[Revalidate db path, inode, origin, branch, and HEAD]
J -- Failure --> M[Rollback owned entries and retain uncertain stage]
L --> N[Re-run convergence and report readiness]
Reviews (1): Last reviewed commit: "Organization install: Preserve canonical..." | Re-trigger Greptile
immakermatty
left a comment
There was a problem hiding this comment.
Admin review (immakermatty): souladné se směrem Lazuria — fail-closed recovery db-first parentu, žádná nová data authority, non-Darwin vrací explicitní blocker. Lokálně na macOS ověřeno 42 + 132 testů pass.
Status: ready for review
A declared Organization application could contain only its canonical
db/checkout while updater status treated the parent as current and Doctor treated the directory as available. This change makes missing managed repositories and missing declared app runtimes block workspace readiness, and lets the existing explicit Organization install operation safely complete the Mission Control app checkout around an already valid database.The installer retains immutable Forge identity checks and verifies the database’s own Git root, origin, canonical branch and clean HEAD. It stages and verifies the app repository, then publishes app entries using macOS
renameatx_np(RENAME_EXCL)through the system JavaScript bridge and pinned directory descriptors, activating.gitlast. Database path, inode, origin and HEAD are preserved. Unknown content, symlinks, foreign/dirty databases and concurrent changes fail closed. Rollback preserves foreign edits and uncertain recovery stages; successful empty stages are intentionally retained to avoid unsafe pathname cleanup.Recovery into an existing db-first parent is Darwin-only. Other platforms return an explicit unsupported-recovery blocker; ordinary installation into an absent target retains its existing platform support. No compiler, dependency, service or new data authority is added. Explicit
apps: []data-only declarations remain valid.Validation on HEAD
bd110918adce404874689ec9da0ef3ddacfe2b8f:bun run checkpassed all gates throughlazurio:test(349 pass, 1 skip), then correctly stopped at the resident clean-source guard while the changes were staged. This one-shot command is not claimed as a pass.bun run --cwd launchpad check: 1,140 pass, 16 skip, zero failures.bun run doctor:agent-skills: pass.bun run resident:test: 143 pass, 1 skip, zero failures.bun run pr:preflight: pass against currentorigin/main.gpt-5.5safety review raised two actionable findings; both were fixed with direct regressions. Follow-upgpt-5.5 highreview is clean.Fixture coverage includes db-first success and idempotence, dirty/foreign/branch/unknown/symlink/tracked-db rejection, failures before every publication step, actual native no-overwrite behavior, target/staging path swaps, concurrent foreign edits and Doctor/updater regressions. Read-only review Doctor and updater status against the actual primary root both identify its missing Mission Control app checkout; Doctor also identifies the undeclared Design System runtime.
Canonical installation remains gated on publication of Organization identity PR112. The Design System runtime lives in Design System PR2, and its Organization documentation in Organization PR113. Native launcher PR325 is separate. End-to-end canonical app Start/Open/Stop smoke follows publication and standard install/update, rather than applying an unmerged workaround to the primary checkout.
Mission Control:
HumanAndMachine-ai/mission-control-data:v3,data/mission-control/plans/2026/09/DEV-6568-organization-app-readiness.yaml; active tasktask-2026-09-06-017inTODO.tasks.json. Completion and post-publication runtime evidence remain with that canonical plan; this PR does not publish its data or merge source changes.