Skip to content

feat(atlas): feedback normalisation + decision wiring, nominations only (#9977) - #10422

Merged
dezren39 merged 1 commit into
mainfrom
queue/16851-9977-feedback-normalisation
Nov 15, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/16851-9977-feedback-normalisation

Conversation

@dezren39

@dezren39 dezren39 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Implements #9977 — follow-on 5 (last) of the #6027 design (doc/2026-11-10T20-41-01Z_design_atlas_retrieval_stats_feedback.md §§6.2–6.4, 7). Gates verified fresh before starting: #9975 closed 2026-11-15T01:41Z and #9976 closed 2026-11-15T03:14Z, both status:done.

What lands

  • Normalisation pass (new atlas-core::feedback_normalise): atlas-feedback-normalised/v1 derivatives over the raw feedback store. Raw records are preserved verbatim alongside the derivative (invariant 4); derivatives are regenerated per day, never appended (§6.2.3). A deterministic phrase-rule classifier emits the §6.2 categories — wrong-content, stale-content, right-file-wrong-chunk, ranking-too-low, ranking-too-high, missing-result, duplicate-or-near-duplicate, other — plus a first-sentence summary and about_chunk_id when a comment explicitly names a different chunk. Vote-only and superseded records skip the pass.
  • Weighting + anti-gaming (§§6.3–6.4) in aggregation: agent self-feedback (vote on a result served to a query the same agent issued, read from the trace's requester identity) is recorded at weight 0, flagged, and counted in its own self_feedback_votes counter — excluded from weighted thumbs, category counts, and unique-requester figures. Agents judging other sessions keep 0.25. Identical comments from one requester collapse to one category count per embed. Per-embed aggregates carry normalised_categories next to the existing unique-requester counts.
  • Per-query feedback: load_query_feedback_votes loads the chunk_id: null records the chunk loader skips; they aggregate at window level (query_feedback) with missing_result_votes.
  • Decision wiring (§7) — nominations only: the weekly report now nominates retention_reingest_candidate (weighted down-vote concentration + stale-content → re-ingest first), content_review_candidate (wrong-content → human review before any deletion), ranking_change_candidate (recurring ranking-too-low, eval-gated), self_feedback_process_finding (self-feedback clusters), and ingestion_candidate (per-query missing-result). Every nomination detail names its unique-requester figure. The markdown report gains the per-window feedback table. No automated deletion, ranking change, or weight change ships — nominations only, per the issue scope.
  • CLI: atlas traces normalise runs the pass over the feedback store (query requesters from the traces dir) and writes the per-day derivative file; traces stats / traces report feed per-query votes through.

Acceptance mapping

  • Sample essay feedback normalises into the §6.2 categories with raw text preserved — classifier tests per category incl. multi-category + other fallback; verbatim-preservation test.
  • A self-feedback case is recorded at weight 0 with the flag set — module test + aggregate test (excluded from weighted figures) + CLI smoke (fb2 → self_feedback: true, weight: 0.0).
  • The weekly report carries at least the nomination sections with unique-requester figures — report test asserts nomination kinds + "1 unique requesters" in the detail + markdown feedback section; CLI smoke report nominates retention_reingest_candidate and ingestion_candidate on the fixture.

Tests

Oracle: design §§6–7, named in each test module.

  • cargo test -p atlas-core — 102 passed (6 new feedback_normalise, 3 new trace_stats; all pre-existing green).
  • cargo test -p atlas-search — 41 + 11 (cli_parity) passed.
  • CLI smoke against a temp trace/feedback fixture: traces normalise → 3 raw → 3 derivatives, 1 self-feedback; traces report → nominations + feedback aggregates as above.
  • cargo fmt --check clean for the touched crates (one pre-existing diff in trace_ingest.rs left untouched).

Queue: task 16851, lane any-c.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ly (#9977)

Follow-on 5 of the #6027 design (doc sections 6.2-6.4, 7):

- atlas-core `feedback_normalise` module: atlas-feedback-normalised/v1
  derivatives over the raw feedback store (invariant 4 — raw records
  preserved verbatim alongside; derivatives regenerated, never appended).
  Deterministic phrase-rule classifier emits the section 6.2 categories
  (wrong-content, stale-content, right-file-wrong-chunk, ranking-too-low,
  ranking-too-high, missing-result, duplicate-or-near-duplicate, other),
  a first-sentence summary, and about_chunk_id when a comment names a
  different chunk. Vote-only and superseded records skip the pass.
- Section 6.4 self-feedback: an agent voting on a result served to a
  query that same agent issued (trace requester identity) is flagged
  and weighted 0; other agents keep the ordinary 0.25 weight (6.3).
- trace_stats: FeedbackVote carries the comment; per-embed feedback
  aggregates gain normalised category counts (identical comments from
  one requester collapsed per embed, 6.4), self_feedback_votes, and
  the existing unique-requester counts; per-query votes (chunk_id:
  null) load via load_query_feedback_votes and aggregate at window
  level with missing-result counts.
- Weekly report decision wiring (section 7), nominations only:
  retention_reingest_candidate (stale-content), content_review_candidate
  (wrong-content), ranking_change_candidate (recurring ranking-too-low,
  eval-gated), self_feedback_process_finding (clusters), and
  ingestion_candidate (per-query missing-result) — every detail names
  its unique-requester figure. Markdown gains the per-window feedback
  table. No automated deletion, ranking, or weight change.
- CLI: `atlas traces normalise` runs the pass over the feedback store
  (query requesters read from the traces dir) and writes the per-day
  derivative file; stats/report commands feed per-query votes through.

Tests (oracle: design sections 6-7): classifier categories incl.
multi-category and other-fallback, raw preservation, self-feedback
weight 0 + flag, supersede/vote-only skip, about-chunk, derivative
round-trip; stats self-feedback exclusion + category collapse,
per-query loader + missing-result aggregation, report nominations
with unique-requester figures. atlas-core 102, atlas-search 41+11
green; CLI smoke: normalise 3 raw -> 3 derivatives (1 self-feedback),
report nominates retention_reingest + ingestion on the fixture.

Co-authored-by: repo-worker-code (lane any-c) <fleet@developing.today>
@dezren39
dezren39 requested a review from a team as a code owner November 15, 2026 03:39
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T03:39:47.706607Z
We couldn’t complete this review. Comment @codex review to try again.
05f5fff 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8edbb45d-8dc1-4948-bbfb-fe5be233fc0e
Commits

Reviewing files that changed from the base of the PR and between 989bb98 and 05f5fff.

Files selected for processing: 4

  • pkgs/atlas-search/crates/atlas-core/src/feedback_normalise.rs
  • pkgs/atlas-search/crates/atlas-core/src/lib.rs
  • pkgs/atlas-search/crates/atlas-core/src/trace_stats.rs
  • pkgs/atlas-search/crates/atlas-search/src/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@dezren39

Copy link
Copy Markdown
Member Author

Codex disposition (lane any-c, task 16851): the Codex code review on head 05f5ffffff FAILED on Codex usage limits ("You have reached your Codex usage limits for code reviews") — the review never ran and produced zero findings (no inline review comments on this PR). This matches the fleet-wide Codex limit state recorded 2026-11-15T01:36Z. There are no undispositioned Codex findings; merging under the standing criteria (atlas-core 102 + atlas-search 41/11 tests green locally, CLI smoke verified, diff matches the #9977 packet scope).

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