38 lines
5.4 KiB
Markdown
38 lines
5.4 KiB
Markdown
# Accepted-snapshot alias timing probe — preparation only
|
|
|
|
Prepared by Codex-9e8r6t /root/linux_readiness for root's #9 decision. **Not compiled or executed. No timing result is claimed.** No production, #9 proposal, existing experiment, GUI, server or Linux/WSL/VPN input was changed.
|
|
|
|
`inputs/document.rs` is an exact copy of current `crates/oa-desktop/src/document.rs`, SHA256 `2ECC2CD496D4A83FD7A32B9DC68E49F0F1CB31A06263DFD6939B4764DA5B73E2`. `probe.rs` includes it as a private module with only module-level `allow(dead_code)`. It is compiled as an ordinary binary, so its existing `cfg(test)` modules are not included. No Document implementation was adapted or replaced.
|
|
|
|
The copied release1 baseline is the existing 30-reachable/37-physical-file engineering walkthrough. All authored file bytes and the prior CLI preview/receipt are preserved and hash-indexed in `inputs.json`. The CLI prediction comes from the historical `f4e426a` experiment; its whole-process times are **not** used as Document times. No synthetic scaling fixture is added.
|
|
|
|
## Measured sections, once root executes
|
|
|
|
- Disk/source discovery (`source_files::load_project`) has its own interval, outside every accepted-command measurement.
|
|
- `Document::from_bundle` reports initial source compilation plus Document history-size estimation separately. It must reproduce the exact raw accepted bundle: no UUID insertion, migration or normalization. The probe additionally checks authored declaration IDs.
|
|
- `prepare_command(SetAlias)` is timed separately from `update_bundle_with_identity_map` on the captured accepted snapshot. The latter is the actual production update function, including its defensive revalidation.
|
|
- Actual copied `Document::execute(SetAlias)` includes its own prepare/update and commit/history work. This is the candidate recomputation cost under examination, not the CLI process cost.
|
|
- Actual `Document::undo` and `redo` have separate intervals and exact postcondition checks.
|
|
|
|
Each of three default samples starts with a fresh Document. Odd samples execute before separately preparing a preview; even samples prepare/update first. This exposes ordering/warm-up effects without calling repeated runs independent cold starts. All raw phase times remain separate; do not subtract them as if they were controlled isolated costs. Input cloning, file inventory/readback, assertions, JSON output and disposal of returned values are outside measured command intervals. Allocation performed inside each production call remains inside it.
|
|
|
|
The expected Project is independently copied from the accepted baseline and only the selected Activity's alias is changed from `oa_restore_work` to `oa_restore_pressure`. All UUIDs and other Project fields must remain equal. The expected full SourceBundle overlays the exact earlier CLI `before`/`after` changes onto this baseline; every before text must match first. Prepared preview and Document execution must both equal those complete expectations. Undo restores original Project/source, clean state and history; Redo restores exact renamed state. Every sample rechecks all 37 physical files byte-for-byte. No save routine or file-writing API occurs in the Rust probe; output is stdout only.
|
|
|
|
## Deferred compile and run
|
|
|
|
Only run after root releases the compiler lease. Use PowerShell 7.4+ for native raw stdout/stderr redirection. Supply the **actual successful** forthcoming `gui-build-v3-messages.jsonl` path under this checkout; no placeholder path is silently resolved or newest rlib selected:
|
|
|
|
```powershell
|
|
& .local/source-alias-rename-preparation-20260911/in-process/run.ps1 `
|
|
-ArtifactMessages '<actual project-local path>/gui-build-v3-messages.jsonl' `
|
|
-RunName 'accepted-snapshot-01' -Iterations 3 -RunProbe
|
|
```
|
|
|
|
Omit `-RunProbe` for compile-only. Run names are exclusive, path-safe and never overwritten. The script requires one successful terminal Cargo record and one exact non-test oa_core/serde_json library artifact each. It preserves the messages, binds explicit rlibs and fingerprint bytes, and records compiler/linker/runtime/input hashes. A top-level rlib is matched to exactly one dependency file by SHA256 **and bytes**, never modification time. Missing or ambiguous artifact/fingerprint evidence fails before compilation.
|
|
|
|
`compiler-version`, `compile` and optional `probe` produce distinct raw stdout/stderr and status receipts. Any failure remains in that run directory, including a final failure receipt; use a new name for any authorized retry. The compile phase uses `-Dwarnings`, `opt-level=0`, debug assertions and actual GUI core rlibs. Compile wall time is recorded separately. Later input/dependency changes refuse rather than relabel an old measurement. Read the timing JSON lines only if the process completes successfully with all sample verification records.
|
|
|
|
## Decision limits
|
|
|
|
This measures one current accepted, complete authored source project. It does not implement or benchmark an opaque prepared capability, preview rendering, UI latency, stale confirmation, invalid/refused commands, larger-model scaling, release optimization, memory/RSS, concurrent editing or native behavior. Parent must judge latency and integration costs before choosing recompute-on-confirm versus an alias-specific checked capability. A fast isolated result would not establish responsiveness under GUI contention; a slow result would motivate a separately reviewed design, not bypass current Document validation. If Document or core changes before decision, compare the recorded inputs and scope again.
|