Skip to content

chore(runtime-host): add opt-in macOS checkpoint capability probe - #6233

Open
MicroGery wants to merge 1 commit into
apache:mainfrom
MicroGery:codex/macos-checkpoint-capability-probe
Open

MicroGery wants to merge 1 commit into
apache:mainfrom
MicroGery:codex/macos-checkpoint-capability-probe

Conversation

@MicroGery

Copy link
Copy Markdown
Contributor

Summary

Refs #5605. Extracts the developer-only macOS APFS capability probe as requested in the scope review.

  • Add an explicitly invoked runner and native creation/deletion probe on its own disposable APFS disk image. The runner rejects supplied paths and root/sudo execution, never requests elevation or adds entitlements, and uses non-forced detach and non-recursive owned-file cleanup.
  • Keep diagnostics separate from Host startup, checkpoint publication and CI volume operations. Even successful creation/deletion reports productionAuthorityReady: false; this is not a workspace-authority implementation.
  • Recognize C source in both ASF header checks and source-release packaging, with a source-archive regression test that failed before the extension fix.
  • Provide standalone usage, exit-code and cleanup documentation.

Based directly on main 2b0e4a25f; no dependency on #5605 and no publication/runtime behavior changes. The probe source is extracted unchanged from ee5bdd6b1.

Verification

  • Probe classification/argument tests plus ASF header/source-release suites: 72 passed, 0 failed.
  • New C source-archive regression verified failing before the fix and passing afterward.
  • Biome checks on all six changed JavaScript files passed.
  • xcrun clang -std=c11 -Wall -Wextra -Werror -fsyntax-only on the native probe passed.
  • Actual source candidate creation and verification from committed head fdab129f5 passed (apache-maka-0.2.2-incubating-src.tar.gz).
  • Normal pre-commit hooks and diff whitespace checks passed.
  • No full product build/typecheck or product suite rerun: this changes developer scripts and release classification only. No disk-image/snapshot operation performed in this split validation; no Windows/Linux native validation claimed.

Operational boundary

Manual macOS diagnostic only, with Xcode command-line tools required. Normal completion removes its disposable resources; interrupted execution or failed detach can leave the exact reported directory/image for manual diagnosis. This does not prove stable snapshot reads, entitlement distribution, external-writer isolation, Session-state alignment or crash-safe production capture. The workspace consistency contract and concrete production adapter remain separate discussions.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex extracted the diagnostic, added source-release coverage and documentation, ran local checks and prepared this PR. The commit includes Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally (script lint/tests passed; full product typecheck not rerun)

Does this PR entail a change in behavior?

  • Yes — explicit diagnostic command and C source classification, described above
  • No

Extract the diagnostic-only APFS creation/deletion probe from apache#5605. Keep it separate from Host startup and checkpoint publication, with explicit unsupported and cleanup outcomes.

Recognize C source in both license and source-release classification, with regression coverage. Document scope and safe manual use independently of the publication feature.

Generated-by: Codex
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Oct 22, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

Review at fdab129f5f00d18c916515e5d96cc783121511f9. No confirmed P0–P2 in the diagnostic or release-classification changes. CI is not green; the Host test failure is detailed below.

I read all nine changed files. The C probe, runner and four classification/argument tests are byte-identical to the diagnostic extracted from #5605's previous head ee5bdd6b; this PR is based directly on main and has no checkpoint-publication dependency. The additional work documents the standalone command and teaches both ASF header auditing and source-archive classification to accept C text sources.

The invocation and cleanup boundaries are explicit in macos-checkpoint-capability-probe.mjs:51–68 and :134–151: the runner accepts no supplied paths, rejects root/sudo execution on macOS, owns a new temporary directory and APFS image, and uses ordinary detach plus non-recursive removal of its owned resources. A failed detach preserves the resources. The C code checks the dedicated APFS mount, creates a unique snapshot name and deletes it only after successful creation. The report always sets productionAuthorityReady: false; a successful diagnostic is not evidence that checkpoint capture, snapshot reads or a deployable workspace authority work.

Local validation passed: 72 probe/header/source-release tests, the full checkout header audit, git diff --check, and actual source-candidate creation and verification from this committed head. Removing only the new .c source-archive classification makes the new C archive regression fail with the previous Cannot safely classify non-text release input error. Direct execution on Linux returns exit 2 with macOS required before creating probe resources; caller-supplied paths are rejected before resource creation as well.

CI remains unresolved. The first test attempt fails in two Clients share exact retryable Session branch and revision authority, expecting committed but receiving source_revision_conflict. The complete Host source tree, core/runtime/storage/Desktop sources, dependency manifests and CI workflows are byte-identical to the base. I found no change connecting this failure to the opt-in probe and have rerun the failed job; no successful replacement result is available yet. Main's latest run also failed, but in a different ShellRun readiness-marker test, so that is not a matching reproduction of this assertion.

This Linux review did not compile against the macOS SDK or perform disk-image, snapshot, entitlement or interruption/cleanup operations on macOS. The pure tests do not establish native feasibility. I did not run a full product build/typecheck, the entire repository suite or production checkpoint acceptance; no product startup or runtime path is changed here.

@github-actions github-actions Bot added the stale No qualifying activity within the lifecycle policy window label Nov 22, 2026
@github-actions

Copy link
Copy Markdown

This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed.

Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the pinned label.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines stale No qualifying activity within the lifecycle policy window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants