← Back to Pull requests

Read a relative stored path against its session folder in trace #103

Closed
unknown closed this pull request without merging on Oct 27, 2026 01:57 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 01:09 UTC
Author

trace with a full path matched a stored relative path by its tail alone (the clause added in 0.19.1 for prodex). Codex stores relative paths too, so trace /…/sessiondex/README.md listed every session that edited a README.md in any folder. On this machine 6 of its 8 hits were other projects' READMEs, and such hits can push real ones past the 20-result cap. The trace_file MCP tool and the web view share this query, and agents usually pass a full path.

Changes:

  • sessions_for_file and edits_for_session: when the query is a full path, a relative stored path counts only if the session folder plus the path equals it. A relative query has no folder to check against and matches as before. (Relative paths are relative to the session folder: 7369 of 8587 on this machine resolve to an existing file that way, and the rest are mostly in deleted folders.)

  • The file-name fallback (sessions_for_moved_file) now lists only paths that are gone. It says "the folder has moved since", but it listed every same-named file that still exists. The fix above makes it run more often (for a file no session touched), where it showed 20 unrelated .gitignore files.
  • Tests (each failed first): trace_reads_a_relative_stored_path_against_its_session_folder, edits_for_session_reads_a_relative_path_against_the_session_folder, a_name_match_lists_only_paths_that_are_gone. The existing trace_matches_absolute_query_against_relative_stored_path had a fixture whose session folder (/proj/api) did not contain the queried path (/home/dev/api/...); its query now sits under the session folder, with the same assertions. Mutation check, all killed: no folder check in either query, the folder check applied to relative queries too (in either query), joining without /, and no existence filter in the fallback.

    Real data (WSL), trace --json with the full path of 115 files across sessionwiki, swapdex and deckweb, 0.34.15 against this branch: 140 hits dropped, all of them another file (the relative path read against its session folder is not the query); 0 correct hits dropped; 5 correct hits newly shown (freed from under the cap); 23 name-fallback hits, all paths that no longer exist.

    Local gates: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test (335 passed, 0 failed).

    Diff: 289 lines (+216 / -73) across 3 files Reviewer: youdie006 Review duration: 47m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 289 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #103"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.2% · Safe to merge
    17.2%