Skip to content

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Unhandled Exceptions on Model Estimation Failure#115

Merged
seonghobae merged 39 commits into
masterfrom
sentinel-fix-unhandled-exceptions-9399904207089151873
Jul 10, 2026
Merged

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Unhandled Exceptions on Model Estimation Failure#115
seonghobae merged 39 commits into
masterfrom
sentinel-fix-unhandled-exceptions-9399904207089151873

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

R/aFIPC.R ํŒŒ์ผ์—์„œ try() ๋ธ”๋ก ๋‚ด๋ถ€์˜ ํ†ต๊ณ„ ๋ชจ๋ธ ์ถ”์ •(mirt)์ด ์‹คํŒจํ–ˆ์„ ๋•Œ, ๊ฒฐ๊ณผ ๊ฐ์ฒด์˜ ์กด์žฌ ์—ฌ๋ถ€๋ฅผ ๊ฒ€์ฆํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ๋‚ด๋ถ€ ํ”„๋กœํผํ‹ฐ(@optiminfo$secondordertest)์— ์ ‘๊ทผํ•˜์—ฌ ๋‹ค์šด์ŠคํŠธ๋ฆผ ์˜ˆ์™ธ ๋ฐ ์ƒํƒœ ์œ ์ถœ์ด ๋ฐœ์ƒํ•˜๋Š” ์ค‘๊ฐ„ ์œ„ํ—˜๋„(MEDIUM) ๋ณด์•ˆ ์ทจ์•ฝ์ ์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์ฒด ์†์„ฑ์— ์ ‘๊ทผํ•˜๊ธฐ ์ „ exists('model') ๊ฒ€์ฆ์„ ์ถ”๊ฐ€ํ•˜์—ฌ Fail-secureํ•˜๊ฒŒ ๋Œ€์‘ํ•˜๋„๋ก ๋ฐฉ์–ด์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํŒจํ„ด์„ ์ ์šฉํ–ˆ์œผ๋ฉฐ, ์ถ”๊ฐ€๋กœ !itemtype == 'ideal' ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ•˜๊ณ  ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ ์ค‘ ๋„ค์ž„์ŠคํŽ˜์ด์Šค ํ•จ์ˆ˜ ์ถฉ๋Œ์„ ๋ง‰๊ธฐ ์œ„ํ•ด ์™ธ๋ถ€ ํŒจํ‚ค์ง€ ํ•จ์ˆ˜ ํ˜ธ์ถœ์„ mirt::๋กœ ํ•œ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ด€๋ จ ํ•™์Šต ๋‚ด์šฉ์„ .jules/sentinel.md์— ๊ธฐ๋กํ–ˆ์Šต๋‹ˆ๋‹ค.


PR created automatically by Jules for task 9399904207089151873 started by @seonghobae

This commit introduces a security enhancement to the `autoFIPC` function by adding rigorous type checking for main input parameters (`newformXData`, `oldformYData`, `newformCommonItemNames`, `itemtype`) to prevent potential state leaks and unhandled downstream exceptions that could occur when malformed inputs are dynamically evaluated. Furthermore, the fix adds existential checks on `oldFormModel` and `newFormModel` immediately following their `try()` estimation blocks to ensure failures fast-fail cleanly rather than crashing internally on missing property access (`@OptimInfo`). Test cases were updated to reflect these security restrictions.
โ€ฆvulnerability caused by multiple empty search results.
๋ฃจํ”„๋ฅผ ๋Œ ๋•Œ๋งˆ๋‹ค `which(NewScaleParms$item == ...)`์™€ ๊ฐ™์ด ๋ฐ์ดํ„ฐ ํ”„๋ ˆ์ž„์„ ์ „์ฒด ์Šค์บ”ํ•˜๋Š” ๋กœ์ง์„ ๋ณ€์ˆ˜(`newIdx`, `oldIdx`)๋กœ ์บ์‹ฑํ•˜์—ฌ, ๋™์ผ ๋ฌธํ•ญ์— ๋Œ€ํ•œ ๋ฐ˜๋ณต์ ์ธ O(N) ์Šค์บ”์„ O(1)์— ๊ฐ€๊น๊ฒŒ ์ค„์˜€์Šต๋‹ˆ๋‹ค. ์•„์šธ๋Ÿฌ ๋ถˆํ•„์š”ํ•œ `paste0()` ์Šค์นผ๋ผ ๋ž˜ํ•‘๋„ ํ•จ๊ป˜ ์ œ๊ฑฐํ•˜์—ฌ ์˜ค๋ฒ„ํ—ค๋“œ๋ฅผ ์ค„์˜€์Šต๋‹ˆ๋‹ค.
@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a ๐Ÿ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

seonghobae and others added 9 commits July 8, 2026 06:21
๋ฃจํ”„๋ฅผ ๋Œ ๋•Œ๋งˆ๋‹ค `which(NewScaleParms$item == ...)`์™€ ๊ฐ™์ด ๋ฐ์ดํ„ฐ ํ”„๋ ˆ์ž„์„ ์ „์ฒด ์Šค์บ”ํ•˜๋Š” ๋กœ์ง์„ ๋ณ€์ˆ˜(`newIdx`, `oldIdx`)๋กœ ์บ์‹ฑํ•˜์—ฌ, ๋™์ผ ๋ฌธํ•ญ์— ๋Œ€ํ•œ ๋ฐ˜๋ณต์ ์ธ O(N) ์Šค์บ”์„ O(1)์— ๊ฐ€๊น๊ฒŒ ์ค„์˜€์Šต๋‹ˆ๋‹ค. ์•„์šธ๋Ÿฌ ๋ถˆํ•„์š”ํ•œ `paste0()` ์Šค์นผ๋ผ ๋ž˜ํ•‘๋„ ํ•จ๊ป˜ ์ œ๊ฑฐํ•˜์—ฌ ์˜ค๋ฒ„ํ—ค๋“œ๋ฅผ ์ค„์˜€์Šต๋‹ˆ๋‹ค.
Brings the scoped Trivy private-key suppression (trivy.yaml + .trivyignore.yaml, #116) so the required trivy-fs gate stops failing on the vendored openssl doc example key (verified false positive).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
Brings the scoped Trivy private-key suppression (trivy.yaml + .trivyignore.yaml, #116) so the required trivy-fs gate stops failing on the vendored openssl doc example key (verified false positive).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
Brings the scoped Trivy private-key suppression (trivy.yaml + .trivyignore.yaml, #116) so the required trivy-fs gate stops failing on the vendored openssl doc example key (verified false positive).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
@seonghobae seonghobae force-pushed the sentinel-fix-unhandled-exceptions-9399904207089151873 branch from df5084a to 5602fbd Compare July 9, 2026 07:02
@seonghobae

Copy link
Copy Markdown
Collaborator Author

Order-safe local validation for this PR in the current queue stack:

Stack tested: origin/master + #93 + #108 + #111 + #113 + #115 (5602fbd64578148a17d59b4401691f5aea527e94).

Observed queue-stack merge conflict:

Validation results after that local conflict resolution:

  • git diff --check origin/master...HEAD: clean.
  • R CMD INSTALL . with local R 4.4.1: DONE (aFIPC).
  • Full testthat::test_dir('tests/testthat'): FAIL 0 | WARN 0 | SKIP 0 | PASS 35.
  • Exact markdownlint command used by CI: 14 files linted, 0 error(s).

Design/Figma scope check: this repository is still an R package with no frontend/visual surface, so no UI or Figma artifact is warranted for this PR.

This is validation evidence only; merge still needs the required current-head checks and non-stale approval path. When the earlier PRs land, #115 should preserve the local .jules/sentinel.md union above if GitHub reports the same conflict.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

Updated order-safe local validation after #113 advanced and was corrected to 4f38215.

Current #115 head tested: 5602fbd64578148a17d59b4401691f5aea527e94.

Stack tested: origin/master + #93 + #108 + #111 + #113 (4f38215) + #115.

Observed queue-stack merge conflict:

Validation results after that local conflict resolution:

  • git diff --check origin/master...HEAD: clean.
  • R CMD INSTALL . with local R 4.4.1: DONE (aFIPC).
  • Full testthat::test_dir('tests/testthat'): FAIL 0 | WARN 0 | SKIP 0 | PASS 35.
  • Exact markdownlint command used by CI: 14 files linted, 0 error(s).

Design/Figma scope check: this repository is still an R package with no frontend/visual surface, so no UI or Figma artifact is warranted for this PR.

This supersedes the earlier local validation comment that was based on the pre-correction #113 stack. Merge still needs the required current-head checks and non-stale approval path. When the earlier PRs land, #115 should preserve the local .jules/sentinel.md union above if GitHub reports the same conflict.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

Updated order-safe validation for current #115 head 7e694a1140071d558d342f5a1a7824536cb6ecdd.

Stack tested: origin/master -> #93 -> #108 -> #111 -> #113 -> #115, using current heads:

Observed queue-stack merge conflict:

Validation after that local conflict resolution:

  • git diff --check origin/master...HEAD passed.
  • R CMD INSTALL . passed using local R 4.4.1.
  • Full testthat::test_dir('tests/testthat') passed: 35 passes, 0 failures/warnings/skips.

No frontend/Figma artifact is warranted for this R package.

#93 remains the queue head; this is validation-only and does not change merge order.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

Updated order-safe validation for current #115 head 7e694a1140071d558d342f5a1a7824536cb6ecdd after #113 was corrected to ebeb327a67f362a0be114f904c7e40a10fbb2806.

Stack tested: origin/master -> #93 -> #108 -> #111 -> #113 -> #115, using current heads:

Observed queue-stack merge conflict:

Validation after that local conflict resolution:

  • Scoped Trivy config files remained present in the stack.
  • git diff --check origin/master...HEAD passed.
  • R CMD INSTALL . passed using local R 4.4.1.
  • Full testthat::test_dir('tests/testthat') passed: 35 passes, 0 failures/warnings/skips.

No frontend/Figma artifact is warranted for this R package.

#93 remains the queue head; this is validation-only and does not change merge order.

seonghobae and others added 10 commits July 9, 2026 13:44
The previous commit added a trivy workflow in CI which failed due to a mock private key found inside `packrat/lib/x86_64-pc-linux-gnu/3.4.1/openssl/doc/keys.html`. This is a vendor mock file not used in production. We configured `trivy.yaml` to skip scanning the `packrat/lib` directory.
The previous commit added a trivy workflow in CI which failed due to a mock private key found inside `packrat/lib/x86_64-pc-linux-gnu/3.4.1/openssl/doc/keys.html`. This is a vendor mock file not used in production. We configured `trivy.yaml` to skip scanning the `packrat/lib` directory.
โ€ฆ1668033757621' into pr-111-restack-current
โ€ฆrability-17559475454595105316' into pr-113-restack-current
โ€ฆp-14810454037042100816' into pr-115-restack-current

# Conflicts:
#	.jules/sentinel.md
@seonghobae

Copy link
Copy Markdown
Collaborator Author

Restacked this PR onto the current #113 head 587929bfc080f1897e312e8df2baa906cbf82f32, which includes #111 9cbc785f9eb8400a49c442d11f3fc11e1180ff2d and #108 8347e2a4cc8056dc536881e89c4831a0c87e1e75. New head: b6de687dc77c54d5e4619f9187b6737be31f2369.

Validation on the restacked head:

  • git diff --check origin/master...HEAD passed.
  • R CMD INSTALL . passed with local R 4.4.1.
  • testthat::test_dir('tests/testthat') passed: 34 pass, 0 failures/warnings/skips.
  • FIPC-focused tests stayed green: test-autoFIPC.R 6 pass and test-fixed-parameter-calibration.R 23 pass.

The only manual conflict was .jules/sentinel.md; it was resolved by preserving the security ledger entries from both sides and keeping the current path-scoped trivy.yaml guidance instead of stale .trivyignore.yaml guidance. Merge order is unchanged: #108 remains the queue head.

@opencode-agent

opencode-agent Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 446df8109fcbe4637bb2bcb59d70948cc8ded5fa
  • Workflow run: 29063389042
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

Pull request overview

OpenCode reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .jules/sentinel.md.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .jules/sentinel.md to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: The PR addresses a medium-risk security vulnerability by fixing unhandled exceptions in model estimation failure scenarios. The changes are well-justified and tested.
  • Head SHA: 446df8109fcbe4637bb2bcb59d70948cc8ded5fa
  • Workflow run: 29063389042
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
Loading

@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 bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .jules/sentinel.md.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .jules/sentinel.md to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: The PR addresses a medium-risk security vulnerability by fixing unhandled exceptions in model estimation failure scenarios. The changes are well-justified and tested.
  • Head SHA: 446df8109fcbe4637bb2bcb59d70948cc8ded5fa
  • Workflow run: 29063389042
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
Loading

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