Skip to content

[codex] Improve TraceDecay follow-up diagnostics#146

Open
ScriptedAlchemy wants to merge 2 commits into
masterfrom
codex/tracedecay-followup-diagnostics
Open

[codex] Improve TraceDecay follow-up diagnostics#146
ScriptedAlchemy wants to merge 2 commits into
masterfrom
codex/tracedecay-followup-diagnostics

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • add doctor reporting for registry/store manifest identity drift
  • persist richer MCP analytics for transport/tool kind, failures, and context memory matches without fact bodies
  • record TypeScript ignored-dependency candidates and surface MCP search hints for symbols behind ignored dependencies
  • dedupe repeated pending session fact proposals and add project/session hint coverage
  • warn when Cursor transcript rows contain literal ${workspaceFolder} placeholders that would break session recall
  • make daemon status distinguish missing, stale, inaccessible, unreachable, and connectable sockets
  • keep selected-project graph-reader search hints read-only when dispatching through registered project selectors

Verification

  • cargo test --lib doctor::tests::registry_drift_findings_report_manifest_identity_mismatches -- --nocapture
  • cargo test --test typescript_extraction_test test_ts_import_type_records_ignored_dependency_candidates -- --nocapture
  • cargo test --test mcp_handler_test test_search_hints_at_ignored_dependency_candidates -- --nocapture
  • cargo test --test automation_session_reflector_runner_test session_fact_proposals_dedupe_repeated_pending_facts_across_runs -- --nocapture
  • cargo test --features test-transport --test mcp_server_test context_call_writes_memory_match_analytics_without_fact_bodies -- --nocapture
  • cargo test --features test-transport --test mcp_server_test failed_tool_call_writes_mcp_runtime_analytics_event -- --nocapture
  • cargo test --lib tool_hints -- --nocapture
  • cargo test --test hooks_test test_build_codex_session_context -- --nocapture
  • cargo test --test agent_test test_cursor_healthcheck_warns_on_literal_workspace_folder_transcript_path -- --nocapture
  • cargo test --lib daemon::tests::service_status -- --nocapture
  • cargo test --lib mcp::tools::handlers::tests::graph_reader_selector -- --nocapture
  • cargo test --lib mcp::tools::handlers::tests::selected_project_retrieve_finds_selected_project_response_handle -- --nocapture
  • cargo fmt --check
  • cargo check --workspace
  • tracedecay sync

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2dfca29

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

@ScriptedAlchemy ScriptedAlchemy marked this pull request as ready for review June 29, 2026 18:07

@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: 3d85f450e0

ℹ️ 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 src/mcp/server.rs Outdated
.and_then(Value::as_f64)
.unwrap_or(0.5)
.clamp(0.0, 1.0);
let payload = response.and_then(tool_result_json_payload);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Derive memory analytics before rendering

For normal tracedecay_context calls, the output format defaults to markdown, so response.content[0].text will not parse as JSON; payload becomes None and the code below records match_count=0/fact_ids=[] even when context_memory_matches returned facts and rendered them. This corrupts the new analytics for default calls (and truncated JSON envelopes have the same problem); build the metadata from the structured context value instead of the rendered MCP response.

Useful? React with 👍 / 👎.

let results = cg.search(query, limit).await?;
let results = filter_by_scope(results, scope_prefix, |r| &r.node.file_path);
let coverage_hint = cg.index_coverage_hint(results.len());
let ignored_dependency_hint = ignored_dependency_hint(cg, query, limit).await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid scanning unresolved refs for every search

This runs even when cg.search already returned matching symbols, and ignored_dependency_hint calls get_unresolved_refs(), which selects the entire unresolved_refs table. On large projects with one row per unresolved import/call, every tracedecay_search now pays an O(all refs) read just to maybe add an ignored-dependency hint; gate it to empty/low-confidence results or query only npm: candidates via the indexed reference_name.

Useful? React with 👍 / 👎.

@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/tracedecay-followup-diagnostics branch from 1760979 to 40665d2 Compare June 29, 2026 18:22
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/tracedecay-followup-diagnostics branch from 40665d2 to 1933a46 Compare June 29, 2026 18:38
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