Skip to content

fix(noema): bounded complete serializer prerequisite - #2662

Open
seonghobae wants to merge 1 commit into
mainfrom
fix/noema-complete-serializer-prerequisite
Open

seonghobae wants to merge 1 commit into
mainfrom
fix/noema-complete-serializer-prerequisite

Conversation

@seonghobae

@seonghobae seonghobae commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Small main-based prerequisite for #2661. Extracts only the reviewed bounded complete personal-auto serializer; no exact-canary/security feature, bootstrap admission, secrets, attestations, App identity, workflow trust-ref or approval-rule changes.

  • Exact existing personal auto endpoint only; other routes retain legacy limits.
  • Full diff and changed-side locations; reject partial input and requests exceeding 491,808 UTF-8 bytes before network.
  • Reuses prior serializer regression bytes, adds complete-location HTTP-boundary capture, and enrolls regression/producer selectors in the existing runtime-quality workflow.
  • Main lacks the canary payload branch: the only necessary serialization adaptation is computing the existing JSON bytes once before enforcing the same ceiling.

Verification

Base: 6a03ae990eb4769869f4f77970cc21ed35141e09.

  • Four files, +123/-2; native diff 11,722 bytes, all 125 changed locations.
  • Actual old-main fetch/parser/call_llm request capture, offline with inert credentials and synthetic PR metadata: 26,452-byte request, 125/125 locations, no diff/location truncation. Candidate 26,432 bytes. No inference invoked for this measurement.
  • Existing Noema suite + workflow contracts: 703 passed, 2 optional document-reader skips before final enrollment assertion refinement; final focused suite 42 passed. Existing source safety ceilings preserved.
  • RED demonstrated against unchanged main (three serializer failures, three enrollment failures); GREEN after bounded adaptation.

Normal independent App review is required. No author approval or merge is requested from automation; parent owns any normal merge after real exact-head approval. The runtime-quality workflow is currently disabled; local enrollment is not claimed as hosted execution.


Devin Review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

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 26 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: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a7ed5b7-3c6d-4aa9-9fa3-d2886508976f
Commits

Reviewing files that changed from the base of the PR and between 6a03ae9 and 23307c6.

Files selected for processing: 4
  • .github/workflows/agent-review-runtime-quality-ci.yml
  • scripts/ci/noema_review_gate.py
  • tests/test_agent_review_runtime_quality_consolidation.py
  • tests/test_noema_complete_auto_input.py
  • 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

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

@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

  • .github/workflows/agent-review-runtime-quality-ci.yml — GitHub Actions review job
  • scripts/ci/noema_review_gate.py — review and security gate shell path
  • tests/test_agent_review_runtime_quality_consolidation.py — regression suite
  • tests/test_noema_complete_auto_input.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: agent-review-runtime-quality-ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: agent-review-runtime-quality-ci.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["CI script: noema_review_gate.py"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: noema_review_gate.py"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_agent_review_runtime_quality_consolidation.py (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_agent_review_runtime_quality_consolidation.py (2 files)"]
  R3 --> V3["targeted test run"]
Loading

Findings

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

  • Head SHA: 23307c6442bf60fa602be39d6016c0ee3c20e1de
  • Workflow run: 40245286138
  • 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["Workflow: agent-review-runtime-quality-ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: agent-review-runtime-quality-ci.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["CI script: noema_review_gate.py"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: noema_review_gate.py"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_agent_review_runtime_quality_consolidation.py (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_agent_review_runtime_quality_consolidation.py (2 files)"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Oct 25, 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.

@cwl-noema-review cwl-noema-review 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.

Noema LLM review

The personal-auto path preserves the complete diff and changed-line location list while rejecting partial or oversized input. The size check covers the serialized request, not just the raw diff. Other routes retain their existing bounds, and the workflow changes enroll both the implementation and its regression tests.

Reviewed changed lines

  • scripts/ci/noema_review_gate.py:79 (RIGHT): Complete-input admission requires both the exact auto model and the designated personal endpoint; matching either alone does not enable it.
  • scripts/ci/noema_review_gate.py:562 (RIGHT): For the selected route, an admissible diff is returned intact before the legacy character-based truncation path.
  • scripts/ci/noema_review_gate.py:1657 (RIGHT): The complete-input branch serializes the entire allowed-location list rather than applying the existing location-list cap.
  • scripts/ci/noema_review_gate.py:1695 (RIGHT): The budget applies to the final JSON bytes, including escaped prompt content, location metadata, and the request envelope, before HTTP request construction.
  • .github/workflows/agent-review-runtime-quality-ci.yml:226 (RIGHT): Implementation changes select both the Noema and review-repair suites; the new serializer test is also included in the workflow trigger and test commands.
  • tests/test_noema_complete_auto_input.py:29 (RIGHT): The serializer fixture checks that all 1,000 changed-side locations survive and that the prompt retains the complete diff.
  • tests/test_agent_review_runtime_quality_consolidation.py:403 (RIGHT): The enrollment contract checks the new test's trigger, occurrence count, pytest enrollment, and compileall enrollment.

Adversarial validation

  • scripts/ci/noema_review_gate.py:562 (RIGHT) falsified: Personal-auto requests still lose source beyond the existing 60,000-character diff limit. — Static control-flow tracing shows that this diff is below the new byte budget and returns unchanged before the legacy truncation logic. The corresponding test asserts equality with the original diff and a false truncation flag.
  • scripts/ci/noema_review_gate.py:1657 (RIGHT) falsified: The diff can remain complete while the old 32 KiB allowed-location limit silently removes reviewable lines. — The selected branch directly dumps all allowed_locations with truncated=false instead of calling the bounded serializer. The added fixture checks that the resulting list contains all 1,000 locations.
  • scripts/ci/noema_review_gate.py:1695 (RIGHT) falsified: A raw diff below the fetch budget can produce an oversized request through location metadata or JSON escaping and still reach HTTP submission. — The entire payload is serialized and encoded before its length is checked. An oversized result raises before Request construction, regardless of whether the raw diff passed fetch_diff.
  • scripts/ci/noema_review_gate.py:1646 (RIGHT) falsified: A caller can submit an already-truncated diff through the complete-input route. — The new guard raises an untruncated-diff error before prompt and request construction. The added partial-input fixture explicitly exercises this condition and checks that no opener is constructed.
  • scripts/ci/noema_review_gate.py:79 (RIGHT) falsified: The expanded input policy unintentionally applies to arbitrary auto endpoints or orchestrator aliases. — Both combinations fail the helper's exact conjunction and retain the original fetch truncation path. These two combinations are also present in the added parameterized regression fixture.
  • .github/workflows/agent-review-runtime-quality-ci.yml:226 (RIGHT) falsified: Changes to the implementation or its new test can bypass the consolidated quality checks. — Both paths are added to the workflow trigger. The implementation selects both relevant suites; the new test selects review_repair and appears in its pytest and compileall commands. The consolidation tests add routing expectations and enrollment assertions.
  • Residual risk: Validation was static against the supplied diff and excerpts; tests and CI were not executed. Actual provider capacity and the omitted transport implementation were not independently verified.

Findings

  • No blocking findings.
  • Result: APPROVE
  • Head SHA: 23307c6442bf60fa602be39d6016c0ee3c20e1de
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
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