Skip to content

Noema required review can spend full budget on an invalid changed-line citation #1613

Description

@seonghobae

Affected consumer

ContextualWisdomLab/naruon#1485 exact head 4e2cb3b39f89aff811d5113962861bd1963d2996.

Required Noema Review run 33444969216, job 99781918923, using trusted central workflow source 5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1.

Exact evidence

The run had a hosted runner, verified the live exact PR head, minted the repository-scoped cwl-noema-review App token, booted the contextual-orchestrator sidecar, completed provider-route preflight, and entered scripts.ci.noema_review_gate.

After roughly 65 minutes in the model/review stage, the terminal deterministic failure was:

Noema reviewed line 1 is not an exact changed-side line

The product PR's repository-owned CI/security/dependency/Semgrep/Bandit/image workflows and coverage evidence independently completed successfully on the same exact head. This Noema result is non-passing, but it is not evidence that Naruon source line 1 is defective.

Root-cause class

The review pipeline allows a model-produced inline citation that does not map to an exact changed-side line to consume most of the required-review wall-clock before the deterministic publisher rejects it. The fail-closed rejection is correct; the latency and evidence classification are not useful enough for a required organization gate.

This is related to, but materially distinct from, #1611: #1611 covers a malformed adversarial-probe outcome followed by retry exhaustion/502. This issue covers changed-side line identity and inline-review publication validation.

Required repair

  1. Add a deterministic RED fixture whose model review names a path/line that is not an exact changed-side line for the bound source head/live base.
  2. Preserve fail-closed rejection; never coerce, nearest-line search, or silently relocate the finding to make it publishable.
  3. Validate path/side/line identity as early as practical after each model result so an invalid citation does not consume the entire required-review budget.
  4. Classify this as MODEL_OUTPUT_INVALID / review-unavailable evidence unless an independently valid source-backed finding exists; do not synthesize a source defect from the bad citation.
  5. If retrying, send deterministic feedback describing the allowed changed-line contract and keep retries materially bounded. Preserve exact attempt receipts and final failure class.
  6. Keep contextual-orchestrator as the only model-routing boundary; do not add direct-provider fallbacks.
  7. Preserve exact-head/live-base binding, reviewer credential isolation, unresolved-thread behavior, and all deterministic security gates.
  8. GREEN acceptance: rerun unchanged naruon#1485@4e2cb3b39f89aff811d5113962861bd1963d2996; the required Noema lane must either publish a schema-valid review whose inline findings all map to exact changed-side lines, or terminate within the bounded budget with typed model-output/review-unavailable evidence. Invalid citations must never be treated as source findings or passing review evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions