Skip to content

fix(report): harden essay HTML title trust boundaries - #981

Closed
seonghobae wants to merge 9 commits into
mainfrom
fix/essay-report-title-trust-boundary
Closed

fix(report): harden essay HTML title trust boundaries#981
seonghobae wants to merge 9 commits into
mainfrom
fix/essay-report-title-trust-boundary

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes #980.

Defect

All three public essay HTML renderers — score, validation-evidence, and facets-calibration — admitted arbitrary str subclasses and called title.strip() during validation. A caller-controlled subclass could execute an overridden text callback inside the report trust boundary before any artifact was written; admitted values later flow through HTML escaping as well.

Test-first lineage

  • 0d222c0e639839fee0a6ded63db866729ebf0c11 — initial RED hostile-subclass regression for the score-report renderer.
  • 4724b43761b9ffd2b478784a15ac842fbee45a73 — GREEN score-report boundary: admit only exact built-in strings (or None).
  • 2ec8aa36b7b37a9d07039430f00e2401213f0c9d — expanded RED regression across score, validation-evidence, and facets-calibration renderers.
  • 096345838fae8822961a4b9af7d8c5b14a2f26bf — GREEN validation-evidence boundary.
  • d992e775eaf58c85a66f88e81c69590aebe53007 + 304bb9ae4806be1dd11ce6107a12aa8d5a74fe43 — GREEN facets-calibration boundary followed by cleanup of incidental full-file replacement noise; the final calibration patch is exactly one validation-line change.
  • b7dd14dd1e24e1157d330589fe3e8f868c20f5cb — changelog trace updated for all three renderers.

Final boundary

The branch is a descendant of protected main@04d0bc21a2a20693bcf16108cd76d394fe844d23. Net production changes are one title-admission line in each of the three essay HTML renderers, plus one focused hostile-subclass regression file and one changelog fragment. Built-in string blank validation and HTML escaping remain unchanged.

No scoring, facets calibration estimation, likelihood, optimizer, or other psychometric arithmetic changes; Rust numerical ownership is unchanged.

Keep Draft until exact-current-head hosted CI/security/review evidence is terminal. Predecessor-head checks and reviews are historical only.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2eafd26e-6f0d-4ba2-ad12-46dee1b90f0f

📥 Commits

Reviewing files that changed from the base of the PR and between 04d0bc2 and e2d5e0e.

📒 Files selected for processing (5)
  • docs/changelog.d/980-essay-report-title-trust-boundary.md
  • python/fast_mlsirm/scoring/essay/calibration_report_html.py
  • python/fast_mlsirm/scoring/essay/report_html.py
  • python/fast_mlsirm/scoring/essay/validation_report_html.py
  • tests/test_essay_report_title_trust_boundary.py

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.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review exact head 032e133e80fe45569f880864147c900e42d75cf5. This is a three-file trust-boundary patch: a hostile str-subclass RED regression, a one-line exact-built-in-string admission fix that rejects caller callbacks before strip()/escaping, and a changelog fragment. No scoring, calibration, estimator, likelihood, or psychometric arithmetic changes. Please evaluate only this current head; predecessor evidence is not applicable.

@seonghobae seonghobae changed the title fix(report): harden essay title trust boundary fix(report): harden essay HTML title trust boundaries Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review the new exact head b7dd14dd1e24e1157d330589fe3e8f868c20f5cb; the earlier request targeted a superseded head. The current patch hardens all three public essay HTML title boundaries (score, validation-evidence, facets-calibration) so str subclasses are rejected before caller-controlled strip()/escaping callbacks. The focused parametrized regression covers all three renderers. Net production diff is one title-admission line per renderer; scoring, calibration estimation, likelihoods, and Rust psychometric arithmetic are unchanged. Please submit formal evidence against this SHA only.

@seonghobae
seonghobae marked this pull request as ready for review August 17, 2026 23:07
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@seonghobae
seonghobae enabled auto-merge (squash) August 17, 2026 23:07
@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb.

  • Head SHA: e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb

  • Workflow run: 32124690362

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: 980-essay-report-title-trust-boundary.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: 980-essay-report-title-trust-boundary.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["Changed file (3 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (3 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Test: test_essay_report_title_trust_boundary.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_essay_report_title_trust_boundary.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb
  • Workflow run: 32124690362
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb.

  • Head SHA: e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb

  • Workflow run: 32124690362

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: 980-essay-report-title-trust-boundary.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: 980-essay-report-title-trust-boundary.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["Changed file (3 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (3 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Test: test_essay_report_title_trust_boundary.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_essay_report_title_trust_boundary.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 18, 2026 10:58

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-review unchanged exact head e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb against the current central coverage implementation. Repository CI, Security Scan, CodeQL, and Semgrep are terminal-success on this SHA. The existing formal CHANGES_REQUESTED maps to central run 32124690362, which predates .github main b71a02a310e77f70c1e59f4719f6857cb33ca886 and its trusted-uv/flat-lock correction. Please generate fresh same-head formal evidence rather than carrying forward the superseded central tooling failure.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-review unchanged exact head e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb with the current central workflow. Repository CI, Security Scan, CodeQL, and Semgrep are terminal-success; the only formal REQUEST_CHANGES is the prior coverage-evidence infrastructure failure. Reassess the three public essay-title trust boundaries and current same-head coverage evidence without transferring that superseded tooling verdict.

Copy link
Copy Markdown
Contributor Author

Superseded by #1007 at the identical exact source SHA e2d5e0ebfe11d9b842a88f4773dbad3d4c577ccb. Repository CI/Security/CodeQL/Semgrep are terminal-success and there are no unresolved review threads. The remaining formal REQUEST_CHANGES is solely central coverage-evidence run 32124690362. #1007 provides a fresh current-workflow event without source churn, review dismissal, gate weakening, or force-push. Closing this predecessor unmerged avoids duplicate landing vehicles.

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.

Harden essay HTML title trust boundaries against str subclasses

1 participant