Skip to content

perf(routing): avoid full-ledger observation scans - #1059

Closed
seonghobae wants to merge 3 commits into
ContextualWisdomLab:codex/autoresearch-psychometric-kpi-20260904from
seonghobae:codex/autoresearch-psychometric-observe-20260904
Closed

seonghobae wants to merge 3 commits into
ContextualWisdomLab:codex/autoresearch-psychometric-kpi-20260904from
seonghobae:codex/autoresearch-psychometric-observe-20260904

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Successor tracking

The complete delta at this PR's head 99efa19ea7846f7b2c47934bc1cf15bf0635d0da is preserved in trusted-branch successor #1067 at 1481c595dc1d16e7bf4b65addaf0bd30322cf2b8. Commit ancestry and tree equality are recorded in docs/product-technical-gap-baseline.md. Review and required-workflow integration continue there. This PR remains open until protected delivery and a fresh full-delta audit; later changes here must also be carried forward.

Outcome

Cuts psychometric observation bookkeeping while preserving contiguous replacement, eviction, privacy, and fail-closed fit contracts.

Stack

Root cause and change

Replacement scanned the complete response ledger although rows are written contiguously. The fix deletes only the existing trailing suffix, with no new state, dependency, API, model, or policy.

Autoresearch KPI

512 contexts, 4 models, 2 items/context, 101 replacements:

  • parent baseline: p50 0.133833 ms; p95 0.152166 ms
  • candidate: p50 0.000875 ms; p95 about 0.001 ms
  • p50 change: 99.35% lower

Exact-head verification (99efa19e)

  • focused psychometric/paper/gap/reasoning contracts: 38 passed
  • benchmark emits fit/rank and observation p50/p95
  • git diff --check

Fit latency, held-out accuracy, and provider latency remain separate KPIs.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 5aac4dd4-cc32-4fdb-af28-3c01bf685308

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-09-04T14:14:42.634508Z 99efa19 New commits
ℹ️ 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.

seonghobae added a commit that referenced this pull request Sep 5, 2026
PR #1067 has exactly the same tree as #1058, already an ancestor of #1064.
Preserve both histories and the complete #1064 tree without reapplying
identical cherry-picked changes. The successor update remains a fast-forward.

Source tree: 8735f95
Predecessors: #1058, #1059, #1061, #1062, #1064.
No predecessor is closed before protected delivery and delta verification.

Signed-off-by: Seongho Bae <me@seonghobae.me>

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • CHANGELOG.md — repository behavior
  • contextual_orchestrator/psychometric_routing.py — Python module behavior
  • docs/doctoring/measured-routing-evidence.md — operator or user guidance
  • scripts/benchmark_psychometric_routing.py — Python module behavior

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Python: psychometric_routing.py (2 files)"]
  S2 --> I2["Python module behavior"]
  I2 --> R2["Review risk: Python: psychometric_routing.py (2 files)"]
  R2 --> V2["pytest plus coverage"]
  Evidence --> S3["Docs: measured-routing-evidence.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: measured-routing-evidence.md"]
  R3 --> V3["docs review"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 99efa19ea7846f7b2c47934bc1cf15bf0635d0da
  • Workflow run: 33898309078
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Python: psychometric_routing.py (2 files)"]
  S2 --> I2["Python module behavior"]
  I2 --> R2["Review risk: Python: psychometric_routing.py (2 files)"]
  R2 --> V2["pytest plus coverage"]
  Evidence --> S3["Docs: measured-routing-evidence.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: measured-routing-evidence.md"]
  R3 --> V3["docs review"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by main

Exact head 99efa19ea7846f7b2c47934bc1cf15bf0635d0da (including 44acd6a3 observation-scan trim) is already an ancestor of current origin/main (62d7457959a8735cfe41747aa2fad7c4958e0ee2). Three-dot diff origin/main...99efa19e is empty. Successor #1067 is MERGED.

Closing without retarget/undraft/force-push (head would equal base if flattened onto main). No admin-merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

superseded-by-main: head 99efa19 already on origin/main; successor #1067 merged

@seonghobae seonghobae closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance priority: medium Normal-priority or P2 work type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant