Skip to content

Run project-server lifecycle on Asupersync - #4361

Open
ScriptedAlchemy with Copilot wants to merge 14 commits into
masterfrom
copilot/finish-asupersync-runtime-cutover
Open

ScriptedAlchemy with Copilot wants to merge 14 commits into
masterfrom
copilot/finish-asupersync-runtime-cutover

Conversation

Copilot AI commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move project-server lifecycle deadlines and retirement supervision onto the native runtime.
  • Preserve tracked cleanup ownership and typed receipts when callers cancel.

Motivation

Project-server lifecycle paths still depended on Tokio timers and task spawning, requiring native callers to hop into Tokio.

Changes

  • Native deadlines. Use std::time::Instant and native_runtime::timeout for lifecycle waits; pass deadlines directly from shutdown callers.
  • Retirement ownership. Submit retirement work through NativeTask. Cancellation reports failure rather than clean completion; detached cleanup remains owned after the caller drops its wait.
  • Native callers. Remove Tokio-context hops from lifecycle helpers and use native retirement tracking during remote recovery.
  • Deadline usage:
    native_runtime::timeout_at(deadline, detach_project_servers(store_administration)).await

Test plan

  • The affected Bazel targets pass
  • bazel build //... passes when the change crosses package boundaries
  • Tested manually (describe below if applicable)

Bazel tests could not start because the launcher could not resolve the host to download Bazel 9.3.0.

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump)
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any)

Review and CI follow-up

  • 9dd6c416 makes route discovery join an already-warming project open before resolving identity. Its controlled-open regression preserves isolation, typed failure, and retirement behavior.
  • b2539ade routes persisted scope-set lookup and CAS admission through the existing asynchronous SQL reader. The registered statement, actor seal, foreground priority, and five-second read budget remain intact.
  • The cold-root storage journey now runs successful CAS, exact readback, and stale-revision conflict requests on native tasks, checks the existing scope-store diagnostics for synchronous reader waits, and joins engine shutdown before removing fixture data.

Pinned formatting, whitespace checks, commitlint, and independent source/API/lifetime review passed. Native compilation and regression execution remain pending in Bazel CI.

@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2539ad

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI linked an issue Oct 19, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Finish the native Asupersync runtime cutover Run project-server lifecycle on Asupersync Oct 19, 2026
Copilot AI requested a review from ScriptedAlchemy October 19, 2026 04:15
@ScriptedAlchemy
ScriptedAlchemy force-pushed the copilot/finish-asupersync-runtime-cutover branch from dbde759 to f2db3d7 Compare October 20, 2026 22:41

@ScriptedAlchemy ScriptedAlchemy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Re-reviewed d14005c and cross-referenced #3736, including its recent progress updates. The new delta only reorders an import; no new concrete source defect found in the lifecycle/retirement slice.

I changed the PR body's Fixes #3736 to Refs #3736. This patch completes focused project-server timer/retirement ownership work, but the broad issue still has runtime seams and execution acceptance to track: native_runtime::handle() retains a production process_runtime() fallback in crates/tracedecay-rusqlite-runtime/src/native_runtime.rs:42–43, and this PR does not supply the owning-suite/platform, storage-wait, or paired performance/thread-use evidence required by the updated issue. Historical entry-point/framing/git/headroom migrations already recorded as landed are not being reopened.

@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review October 21, 2026 06:27
devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy ScriptedAlchemy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Pushed f07293a. Removed the three forwarding lifecycle hop wrappers and their module, imported the canonical lifecycle functions directly, and removed the obsolete Tokio-context comment. This completes the caller cutover without adding a compatibility facade.

Pinned rustfmt, commitlint, git diff --check, and the ambient-Tokio repository gate pass (2,509 production source files checked). Native lifecycle execution remains pending CI.

@ScriptedAlchemy ScriptedAlchemy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Fixed the current Clippy E0308 failures in ee130e4. The production harness shutdown and the two affected lifecycle tests now create std::time::Instant deadlines, matching the canonical native shutdown helpers. Audited all remaining calls to both helpers; no wrappers or timeout changes were added.

Pinned rustfmt, diff checks, and commitlint passed. The three compiler errors came from the current CI job; the new head is pushed for CI compilation and existing shutdown tests. Native builds were not rerun in the constrained local environment.

Use the canonical asynchronous SQL reader for persisted scope lookup and
CAS admission while preserving the foreground priority and read budget.
Exercise real native-task CAS, readback, and stale-revision conflict
requests and assert that scope-set reads do not park native workers.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish the native Asupersync runtime cutover

2 participants