Skip to content

fix(semantic): complete production activation and idle reuse - #748

Merged
ScriptedAlchemy merged 44 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
codex/707-qualification-latest
Aug 29, 2026
Merged

fix(semantic): complete production activation and idle reuse#748
ScriptedAlchemy merged 44 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
codex/707-qualification-latest

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Integrates the completed semantic qualification fixes into #707.

Behavior:

  • preserves typed activation/configuration/fusion failure stages
  • restores persisted activation only after the matching runtime is ready
  • keeps published score domains consistent
  • projects Ready from the durable activation authority
  • completes strict semantic zero-hit first pages without a stale cursor
  • reuses the exact warmed model session after idle expiry instead of reopening the 641 MB model

Production evidence:

  • fresh isolated profile acquired JinaEmbeddingsV2BaseCode on demand without manual seeding
  • offline restart reused unchanged installed model artifacts
  • strict semantic search returned genuine semantic contributions
  • zero-hit strict search completed successfully
  • first strict query after 310 seconds idle completed in 0.72 s; the pre-fix path took 6.07 s and reopened the model
  • session-pool exact regression and all 31 session-pool tests passed
  • exact 11-commit range scanned by gitleaks with no findings

No threshold, timeout, memory limit, or admission budget was raised.

# Conflicts:
#	crates/tracedecay-domain/src/configuration.rs
…plan-reopened' into codex/707-qualification-latest

# Conflicts:
#	crates/tracedecay-global-db/src/configuration/semantic.rs
…plan-reopened' into codex/707-qualification-latest
…plan-reopened' into codex/707-qualification-latest
…plan-reopened' into codex/707-qualification-latest
@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bc8f4ee

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T05:22:05.126908Z e496d16 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e496d16dcd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/tracedecay/src/daemon/project_open_owners.rs Outdated
Comment thread crates/tracedecay-usecases/src/semantic_runtime/production.rs Outdated
Comment thread crates/tracedecay-semantic/src/session_pool.rs
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedcodex/707-qualification-latest

Total Elapsed Time: 5.34s → 5.79s (+8.5%)
CPU Baseline: 89.09µs → 78.91µs (-11.4%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| Function                                  | Calls                      | Avg                             | P95                             | Total                            | % Total                      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| tracedecay-index-bench                    | 1 → 1 (+0.0%)              | 5.34s → 5.79s (+8.4%)           | 5.34s → 5.80s (+8.6%)           | 5.34s → 5.79s (+8.4%)            | 100.00% → 100.00% (+0.0%)    |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.append_pages               | 13 → 13 (+0.0%)            | 181.63ms → 197.49ms (+8.7%)     | 244.84ms → 269.48ms (+10.1%)    | 2.36s → 2.57s (+8.9%)            | 44.21% → 44.32% (+0.2%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.sqlite               | 13 → 13 (+0.0%)            | 124.95ms → 126.22ms (+1.0%)     | 168.82ms → 172.75ms (+2.3%)     | 1.62s → 1.64s (+1.2%)            | 30.41% → 28.32% (-6.9%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings             | 13 → 13 (+0.0%)            | 109.01ms → 110.09ms (+1.0%)     | 148.90ms → 152.04ms (+2.1%)     | 1.42s → 1.43s (+0.7%)            | 26.53% → 24.70% (-6.9%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.workers.install                | 17 → 17 (+0.0%)            | 62.25ms → 78.98ms (+26.9%) ⚠️   | 317.98ms → 324.53ms (+2.1%)     | 1.06s → 1.34s (+26.4%) ⚠️        | 19.81% → 23.18% (+17.0%)     |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| domain.canonical.sha256                   | 114526 → 114526 (+0.0%)    | 10.02µs → 11.55µs (+15.3%)      | 17.54µs → 17.57µs (+0.2%)       | 1.15s → 1.32s (+14.8%)           | 21.49% → 22.83% (+6.2%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.and_publish              | 2 → 2 (+0.0%)              | 558.31ms → 631.77ms (+13.2%)    | 576.19ms → 684.72ms (+18.8%)    | 1.12s → 1.26s (+12.5%)           | 20.91% → 21.81% (+4.3%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.prepare_pages              | 13 → 13 (+0.0%)            | 46.93ms → 60.87ms (+29.7%) ⚠️   | 66.68ms → 88.67ms (+33.0%) ⚠️   | 610.13ms → 791.33ms (+29.7%) ⚠️  | 11.42% → 13.66% (+19.6%)     |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.finalization.advance_wake  | 13 → 13 (+0.0%)            | 52.61ms → 56.45ms (+7.3%)       | 236.45ms → 244.84ms (+3.5%)     | 683.94ms → 733.88ms (+7.3%)      | 12.81% → 12.67% (-1.1%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare     | 13 → 13 (+0.0%)            | 38.50ms → 51.73ms (+34.4%) ⚠️   | 55.05ms → 77.00ms (+39.9%) ⚠️   | 500.54ms → 672.45ms (+34.3%) ⚠️  | 9.37% → 11.61% (+23.9%) ⚠️   |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.extract.parser_artifact        | 276 → 276 (+0.0%)          | 2.06ms → 2.14ms (+3.9%)         | 3.16ms → 3.27ms (+3.5%)         | 567.25ms → 590.56ms (+4.1%)      | 10.62% → 10.19% (-4.0%)      |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.index_file               | 276 → 276 (+0.0%)          | 2.82ms → 2.14ms (-24.1%) 🚀     | 3.02ms → 3.03ms (+0.3%)         | 777.22ms → 589.27ms (-24.2%) 🚀  | 14.55% → 10.17% (-30.1%) 🚀  |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.lexical_source.batch_stage     | 14 → 14 (+0.0%)            | 31.51ms → 34.69ms (+10.1%)      | 47.87ms → 53.90ms (+12.6%)      | 441.21ms → 485.70ms (+10.1%)     | 8.26% → 8.38% (+1.5%)        |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🆕 code_index.build.materialize_increment | 0 → 1 (+100.0%) ⚠️         | 0.00ns → 422.20ms (+100.0%) ⚠️  | 0.00ns → 422.31ms (+100.0%) ⚠️  | 0.00ns → 422.20ms (+100.0%) ⚠️   | 0.00% → 7.29% (+100.0%) ⚠️   |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🆕 code_index.build.assemble              | 0 → 2 (+100.0%) ⚠️         | 0.00ns → 207.78ms (+100.0%) ⚠️  | 0.00ns → 217.06ms (+100.0%) ⚠️  | 0.00ns → 415.57ms (+100.0%) ⚠️   | 0.00% → 7.17% (+100.0%) ⚠️   |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🗑️ code_index.chunk.map_ordered           | 780 → 0 (-100.0%) 🚀       | 630.10µs → 0.00ns (-100.0%) 🚀  | 644.10µs → 0.00ns (-100.0%) 🚀  | 491.48ms → 0.00ns (-100.0%) 🚀   | 9.20% → 0.00% (-100.0%) 🚀   |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🗑️ code_index.build.materialize_full      | 1 → 0 (-100.0%) 🚀         | 366.64ms → 0.00ns (-100.0%) 🚀  | 366.74ms → 0.00ns (-100.0%) 🚀  | 366.64ms → 0.00ns (-100.0%) 🚀   | 6.86% → 0.00% (-100.0%) 🚀   |
+-------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+

Generated with hotpath-rs

…plan-reopened' into codex/707-qualification-latest

# Conflicts:
#	crates/tracedecay-usecases/src/semantic_runtime/production.rs
#	crates/tracedecay-usecases/src/semantic_runtime/production/application_status.rs
#	crates/tracedecay-usecases/src/semantic_runtime/redundancy.rs
…plan-reopened' into codex/707-qualification-latest
…ification-latest

# Conflicts:
#	crates/tracedecay/src/daemon/project_open_owners/query_authority_upgrade.rs
…plan-reopened' into codex/707-qualification-latest

# Conflicts:
#	crates/tracedecay-cli/src/commands/profile_storage.rs
#	crates/tracedecay-maintenance/src/retention/orphan_stores/tests.rs
#	crates/tracedecay-maintenance/src/retention/storage_report.rs
#	crates/tracedecay/src/config.rs
#	crates/tracedecay/src/daemon/profile_identity.rs
ScriptedAlchemy added a commit that referenced this pull request Aug 29, 2026
Resolves semantic_runtime conflicts by keeping the landed #707 status
mechanism (application_status_from_projection + lifecycle overlay +
DaemonSemanticRuntimeBackendV1::from_production) and porting #748 test
contracts; keeps #748 linked-activation redundancy authority and drops
its now-caller-less project_committed_semantic_activation accessor.
ScriptedAlchemy added a commit that referenced this pull request Aug 29, 2026
The #748 author landed their own fixes for both remaining review
findings while this integration was in flight. Adjudication keeps their
implementations — the revision-bound committed-fallback core mount
(stricter CAS than the interim fence relaxation here, which is reverted)
and the closure-scoped activation-receipt snapshot — and retains the
end-to-end regression tests added here, adapted to those shapes.
ScriptedAlchemy added a commit that referenced this pull request Aug 29, 2026
The #748 branch re-merged intermediate #707 heads that predate the
root-decomposition slices; conflicts were older copies of the same
files, resolved to the current decomposed layout. The #748 retention
symlink fix survives at its relocated path.
@ScriptedAlchemy
ScriptedAlchemy merged commit 7cca98d into codex/tracedecay-total-redesign-plan-reopened Aug 29, 2026
8 of 24 checks passed
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

This PR's content is fully merged into #707's branch codex/tracedecay-total-redesign-plan-reopened; the landed merge tip is 7cca98da41 (absorption merges 25da3fa9c6, 1f18f07ceb, 0bd3545e2a, 7cca98da41 — head bc8f4ee6c4 is an ancestor of the pushed branch).

All three Codex review findings are resolved on the integration branch:

  • P1 cold-open core availability: d3e3ba6516 (revision-bound mount_query_authority_for_committed_fallback keeps exact/lexical/graph mountable while the committed semantic restore is deferred), plus an end-to-end deferred-restore regression test deferred_committed_restore_keeps_core_query_lanes_mountable proven falsifiable against the unfixed fence.
  • P2 status-snapshot race: d3d58ac7f5 (with_project_semantic_activation_receipt holds one activation-gate acquisition across receipt + scheduler projection), plus an end-to-end coherence test application_status_observes_activation_mutations_coherently.
  • P2 idle session sibling reaping: 08c79ea077.

Conflict adjudication kept the landed #707 mechanisms (3-arg application_status_from_projection with lifecycle overlay, DaemonSemanticRuntimeBackendV1::from_production, decomposed tracedecay-maintenance/tracedecay-runtime-core layout) and ported this branch's test contracts. Verified on the merged tree: lean + hotpath -p tracedecay --lib checks, and the touched suites (usecases semantic_runtime/retention/feedback, semantic session_pool, query semantic, domain configuration, runtime-core resident_memory, rusqlite exact_sql, global-db configuration, lsp diagnostics, sessions compression, daemon query_authority_provider) — all green; the only local failure is the env-gated distribution-acceptance journey test that requires TRACEDECAY_DISTRIBUTION_FASTEMBED_FIXTURE.

Closing as fully absorbed into #707.

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.

1 participant