-
Notifications
You must be signed in to change notification settings - Fork 0
fix(noema): ground formal verdicts in exact changed-line manifest #1612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
seonghobae
wants to merge
4
commits into
main
Choose a base branch
from
fix/noema-exact-changed-line-manifest-20260901
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9d92a9d
test(noema): reproduce ungrounded changed-line repair retry
seonghobae 32d79f1
fix(noema): ground formal verdicts in exact changed-line manifest
seonghobae 63897f6
ci(noema): regenerate exact-head evidence after #1610
seonghobae 0343778
merge(main): reconcile Noema coordinate grounding after #1610
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
docs/superpowers/plans/2026-09-01-noema-exact-changed-line-grounding.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Noema Exact Changed-Line Grounding Implementation Plan | ||
|
|
||
| > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. | ||
|
|
||
| **Goal:** Keep Noema's exact changed-side validator fail-closed while giving both the first LLM request and its one repair retry an authoritative, compact coordinate manifest. | ||
|
|
||
| **Architecture:** Parse the bounded unified diff once, group exact `(path, line, side)` locations by file and side, and encode consecutive lines as inclusive ranges in compact JSON. Put that manifest in the prompt as the sole authority for `reviewed_lines`, adversarial probes, and finding coordinates; retain the existing deterministic post-response validator unchanged. | ||
|
|
||
| **Tech Stack:** Python 3.14, pytest, GitHub Actions, OpenAI-compatible chat-completion transport. | ||
|
|
||
| **Spec:** Live incident `ContextualWisdomLab/bandscope#1122`, Actions job `99792663163` (`Noema reviewed line 3 is not an exact changed-side line`). | ||
|
|
||
| ## Global Constraints | ||
|
|
||
| - Do not coerce, snap, filter, or silently discard invalid model coordinates. | ||
| - Do not downgrade a formal verdict to a comment to obtain a green check. | ||
| - Keep retry count, reviewer identity, provider routing, merge authority, and current-head validation unchanged. | ||
| - The manifest must be deterministic, UTF-8 safe, and compact enough not to duplicate every changed line as a JSON object. | ||
|
|
||
| --- | ||
|
|
||
| ### Task 1: Reproduce the ungrounded retry | ||
|
|
||
| **Files:** | ||
| - Test: `tests/test_noema_review_gate.py` | ||
|
|
||
| **Interfaces:** | ||
| - Consumes: `changed_diff_locations()` and `call_llm()`. | ||
| - Produces: regressions for range compression and for manifest presence on both initial and repair requests. | ||
|
|
||
| - [ ] Add a mixed LEFT/RIGHT multi-file diff fixture and exact manifest expectation. | ||
| - [ ] Add a two-response LLM fixture whose first verdict fails specifically at reviewed-line item 3. | ||
| - [ ] Run the focused test before implementation and require the expected missing-interface failure. | ||
|
|
||
| ### Task 2: Ground formal review coordinates | ||
|
|
||
| **Files:** | ||
| - Modify: `scripts/ci/noema_review_gate.py` | ||
| - Modify: `CHANGELOG.md` | ||
|
|
||
| **Interfaces:** | ||
| - Produces: `_compact_line_ranges(lines: Sequence[int]) -> str` and `changed_line_manifest(locations: Sequence[tuple[str, int, str]]) -> str`. | ||
|
|
||
| - [ ] Compress sorted line numbers into inclusive ranges. | ||
| - [ ] Serialize one deterministic JSON entry per path with only populated LEFT/RIGHT sides. | ||
| - [ ] Include the authoritative manifest in every request and point repair guidance at it. | ||
| - [ ] Leave `validate_substantive_verdict()` unchanged. | ||
|
|
||
| ### Task 3: Verify and publish | ||
|
|
||
| **Files:** | ||
| - Remove: `.github/workflows/noema-coordinate-grounding-writer.yml` | ||
| - Remove: `scripts/ci/_temporary_apply_noema_coordinate_grounding.py` | ||
|
|
||
| - [ ] Run the focused RED test and confirm the expected failure. | ||
| - [ ] Run the focused Noema suite after implementation. | ||
| - [ ] Run the full pytest/coverage/docstring/compile/diff gates. | ||
| - [ ] Preserve separate test-first and implementation commits and remove one-shot writer files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.