Repository navigation
feat(cache): observe native P3 filesystem operation lifetimes - #786
Merged
Merged
Conversation
This was referenced Oct 31, 2026
lthibault
force-pushed
the
lthibault/p3-operation-lifecycle-780
branch
from
November 1, 2026 09:52
236b5fb to
bf6a88c
Compare
lthibault
marked this pull request as ready for review
November 1, 2026 09:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guest cancellation can precede native filesystem completion. This change observes native CID-directory materialization during P3
open-at, through the owner-local snapshot mechanism from #783.Reconciled onto master after #783 merged as
a85e4c4bf074a1d4f399de9daea92d5476bb9e2e, including #784. Base and former stacked-base trees are identical. Both implementation commits retained identical patches; the diff contains only #780 and its trace-level logging adjustment. An empty CI-trigger commit started PR checks after retargeting.Qualified head:
39e675a9270fe31ab23b6d13d5b004c595a10900. Candidate tree:e28fcf2053909b0aeb20b2bb4d9af521210d915f, identical to the previously published candidate.Refs #780, #753, #785. The first corrective cancellation implementation remains separately tracked in #787.
Guest cancellation currently does not cancel this selected native backend operation. #785 owns the cancellation contract; #787 owns the first corrective implementation. This PR observes existing behavior. Continued execution does not establish an independent Host need for the work.
Behavior and bounds
ForegroundTransaction::run_directory_buildwraps the existing retained blocking operation. Records distinguish waiter lifetime, backend closure entry/outcome, and actual transaction receipt release. Backend return, retained-result disposal, cleanup completion, and capacity release remain separate facts.FsCompletion::try_snapshot()retains one immediatetry_lockand explicitBusy,Unavailable, andPoisonedoutcomes. No registry, polling loop, exporter, public endpoint, or fuel/scheduler instrumentation is added. Records contain no paths, CIDs, capability identifiers, payloads, or error text.TRACE, consistent with trace-level or on-demand observation. Disabled callsites do not evaluate the snapshot read. Existing Cell correlation and cleanup-certification error logging remain intact.Opaque Wasmtime operations remain unsupported for individual backend phases. The pinned hook exposes admission and final opaque-owner release; a retained result or stream can outlive backend return.
NativeFsLeasecannot establish backend outcome or guest cancellation.Runningmeans the selected closure entered and has not returned, not continuous syscall execution. The waiter represents this wrapper, not the entire P3 call.Validation
The deterministic compiled-P3 scenario gates native publication, cancels the Cell, and witnesses Store destruction through bootstrap release. Native file contents independently prove later publication. A separate cleanup gate holds cleanup pending; deletion and completion witnesses establish final cleanup. Tests do not infer correctness solely from new diagnostic fields or use sleeps to establish ordering.
cargo build --workspace --tests --lockedandcargo clippy --workspace --all-targets --locked -- -D warningspassed. Heavy checks used the shared build lock.cargo clippy -p ww --all-targets --locked -- -D warningspassed.git range-diff; Rust source, tests, and filesystem documentation retain the reviewed hashes. All 21 launcher tests and the inherited release-workflow regression check passed on the reconciled base. Formatting and diff checks passed.concurrency.queueand the intentional false publication condition); no workflow edits were made.The original qualification report, raw logs, review hashes, and smoke evidence remain preserved locally under
.context/780/and.context/validation/; publication evidence is additive under.context/780/publish/, and final integration/test/review evidence is under.context/780/landing/and.context/validation/land-*. These private workspace artifacts are not repository attachments.Performance limits
A debug-only smoke compared the existing and observed wrappers in one binary: 20 warmup pairs and 100 alternating measured pairs, each creating 16 native files, setting lengths, renaming, deleting, and disposing results/receipts. All nine power observations reported AC. Median times were 1.222417 ms and 1.245167 ms (+1.86%); P95 times were 1.505209 ms and 1.521792 ms.
This smoke is not a release-build benchmark, production-overhead bound, or whole-system before/after comparison. Both paths contain the new root storage. It measures boundary observation work, not root-memory cost. No new timing claim is made for the logging-level adjustment.
Landing gates
Local master reconciliation, qualification, and independent review are complete. All five required checks passed on
39e675a9270fe31ab23b6d13d5b004c595a10900: Test, Check formatting, Clippy, Require changelog entry, and Solidity (Foundry). Rust CI also passed full host/standard-library tests, pinned P3 and first-party components, canonical packaging/release assembly, installed-package startup, fuzz regressions, and the Chess authority smoke. No review requests or unresolved review threads were present at final readback. Final reviewed-head and merged-tree verification remain merge gates. After merge verification, update and close #780; update #753 and #749 while preserving their remaining scope. Keep #785 and #787 open. No production deployment or manual release publication is requested.Documentation
Status: current. Documentation matches the native P3 directory-build diagnostic and TRACE logging change after reconciliation onto merged master; authored documentation and source bytes are unchanged.
Documentation health:
doc/filesystem-snapshots.md: Current; lifecycle producers, eight-slot retirement and omissions, opaque Wasmtime limits, on-demand reads, TRACE events, independent P3 witnesses, and Runtime correctness: Cell-scoped cancellation for native filesystem and network work #785 cancellation ownership match source.README.md,crates/README.md,doc/architecture.md: Current; existing links and component descriptions remain accurate.doc/runtimes.md,doc/dependencies/wasmtime.md: Current; ownership contracts remain unchanged.tests/fixtures/native-p3/README.md: Current; fixture setup and scope remain accurate.CHANGELOG.md: Current; the inherited ci: hold legacy Kubernetes IPFS publication during VPS migration #784 publication hold remains separate from Observability delivery: P3 host-operation ownership and cancellation lifecycle (#753) #780.doc/legacy-publication-hold.md: Current for this integration; inherited ci: hold legacy Kubernetes IPFS publication during VPS migration #784 operational boundaries do not change Observability delivery: P3 host-operation ownership and cancellation lifecycle (#753) #780 lifecycle claims.Coverage debt: no zero-coverage or reference-only gaps found for this internal surface. No standalone newcomer tutorial was added. No affected diagram drift found. The debug performance smoke is qualification evidence, not a production-overhead bound.