Skip to content

feat(hotpath): fill automation-runtime retrieval/ledger gaps - #782

Draft
ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/hotpath-automation-runtime-gaps-63e3
Draft

feat(hotpath): fill automation-runtime retrieval/ledger gaps#782
ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/hotpath-automation-runtime-gaps-63e3

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

feat(hotpath): fill automation-runtime retrieval/ledger gaps

Summary

Fills the remaining #[hotpath::measure] coverage gaps in crates/tracedecay-automation-runtime only (HP-auto). 31 new measures, all under the automation_runtime.<area>.<verb> label scheme. Attribute-only change: every macro is a no-op with the hotpath feature off, which stays opt-in and out of default. No Cargo.toml, feature, or cross-crate changes.

Previously uninstrumented files

  • automation/runner/retrieval.rs — session-evidence retrieval entry (retrieval.retrieve_session_evidence), outcome acceptance (retrieval.accept_outcome), anchor resolution (retrieval.resolve_anchor, async DB query), project authority binding (retrieval.bind_project_authority), and request-context minting (retrieval.mint_request_context, multi-digest construction).
  • automation/artifacts.rs — improvement artifact chain entry (artifacts.write_improvement_chain) and per-artifact preparation (artifacts.prepare_artifact).
  • automation/artifact_payloads.rs — the seven payload builders (artifact_payloads.build_traces/.build_feedback/.derive_generated_evals/.build_generated_evals/.build_validation_gate/.build_optimizer_diagnosis/.build_codex_handoff).
  • automation/backend_identity.rs — identity derivation (backend_identity.derive), executable resolution (backend_identity.resolve_executable, PATH walk + open), and content digest (backend_identity.digest_executable, full binary read on cache miss).

Mixed files (add-missing only; existing labels untouched)

  • run_ledger.rs — async loaders load_page / load_for_task_key, blocking scans scan_task_summary / scan_page / scan_filtered, and the locked append append_locked.
  • run_ledger/exact_publication.rsbind_exact, publish_exact_blocking (direct blocking callers exist alongside the already-measured async wrapper, mirroring the exact-lookup async/blocking pair), discard_exact, discard_unbound, discard_stale_exact, repair_append_intent.
  • run_ledger/exact_lookup.rsread_exact_identity (used by publication/binding verification).
  • scheduler.rsdecide_host_receipt, acquire_task_lock, release_task_lock.
  • effect_runtime/journal.rsread_record, read_terminal, classify_settlement, check_unbound_cleanup, read_source_bindings, replay_exact_binding.
  • skill_materialization.rsdetect_scopes plus the fs-walk interiors scan_support_files / recompute_package under the already-measured reconcile/materialize entries.

Getters, Display impls, thin one-line delegating wrappers (e.g. find_run_record, load_latest_scheduler_effectful_for_task_key), and test code were skipped.

Verification

  • cargo check -p tracedecay-automation-runtime — pass (feature off; macros are no-ops).
  • cargo check -p tracedecay-automation-runtime --features hotpath — pass.
  • cargo check -p tracedecay-automation-runtime --features hotpath --all-targets — pass.
  • cargo test -p tracedecay-automation-runtime — 396 passed, 0 failed.

Based on codex/tracedecay-total-redesign-plan-reopened (PR #707); #707 itself is untouched.

Open in Web Open in Cursor 

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a7f6af1

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

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedcursor/hotpath-automation-runtime-gaps-63e3

Total Elapsed Time: 5.41s → 5.05s (-6.7%)
CPU Baseline: 79.96µs → 83.29µs (+4.2%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                            | P95                            | Total                            | % Total                      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 5.41s → 5.05s (-6.7%)          | 5.41s → 5.05s (-6.7%)          | 5.41s → 5.05s (-6.7%)            | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 195.16ms → 178.89ms (-8.3%)    | 265.16ms → 244.19ms (-7.9%)    | 2.54s → 2.33s (-8.3%)            | 46.88% → 46.05% (-1.8%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 124.97ms → 123.84ms (-0.9%)    | 169.08ms → 169.48ms (+0.2%)    | 1.62s → 1.61s (-0.6%)            | 30.02% → 31.88% (+6.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 109.62ms → 107.88ms (-1.6%)    | 149.42ms → 149.29ms (-0.1%)    | 1.43s → 1.40s (-2.1%)            | 26.33% → 27.77% (+5.5%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| CodeIndexProductionOwnerV1::extract_file | 276 → 276 (+0.0%)          | 5.16ms → 4.86ms (-5.8%)        | 8.09ms → 7.34ms (-9.3%)        | 1.42s → 1.34s (-5.6%)            | 26.32% → 26.58% (+1.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 19.67ms → 15.84ms (-19.5%)     | 72.09ms → 53.51ms (-25.8%) 🚀  | 1.63s → 1.31s (-19.6%)           | 30.16% → 26.03% (-13.7%)     |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 547.10ms → 521.99ms (-4.6%)    | 547.88ms → 535.30ms (-2.3%)    | 1.09s → 1.04s (-4.6%)            | 20.22% → 20.67% (+2.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| domain.canonical.sha256                  | 114526 → 114526 (+0.0%)    | 9.42µs → 8.94µs (-5.1%)        | 15.05µs → 15.02µs (-0.2%)      | 1.08s → 1.02s (-5.6%)            | 19.94% → 20.26% (+1.6%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 53.95ms → 53.25ms (-1.3%)      | 264.90ms → 261.75ms (-1.2%)    | 755.32ms → 745.49ms (-1.3%)      | 13.96% → 14.76% (+5.7%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 2.37ms → 2.24ms (-5.5%)        | 3.81ms → 3.30ms (-13.4%)       | 655.05ms → 618.58ms (-5.6%)      | 12.10% → 12.25% (+1.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 61.74ms → 47.07ms (-23.8%) 🚀  | 88.01ms → 68.22ms (-22.5%) 🚀  | 802.57ms → 611.88ms (-23.8%) 🚀  | 14.83% → 12.12% (-18.3%)     |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 2.24ms → 2.10ms (-6.2%)        | 3.70ms → 3.13ms (-15.4%)       | 618.37ms → 579.45ms (-6.3%)      | 11.43% → 11.47% (+0.3%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 50.95ms → 36.78ms (-27.8%) 🚀  | 72.94ms → 53.51ms (-26.6%) 🚀  | 662.36ms → 478.09ms (-27.8%) 🚀  | 12.24% → 9.47% (-22.6%) 🚀   |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.45ms → 1.37ms (-5.5%)        | 2.07ms → 1.98ms (-4.3%)        | 399.67ms → 379.34ms (-5.1%)      | 7.38% → 7.51% (+1.8%)        |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+
| code_index.chunk.identify                | 276 → 276 (+0.0%)          | 1.43ms → 1.36ms (-4.9%)        | 2.05ms → 1.97ms (-3.9%)        | 395.40ms → 375.10ms (-5.1%)      | 7.31% → 7.43% (+1.6%)        |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+----------------------------------+------------------------------+

Generated with hotpath-rs

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.

2 participants