fix(ignore): fail closed when .html4ignore changes during read - #621
fix(ignore): fail closed when .html4ignore changes during read#621seonghobae wants to merge 19 commits into
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Replace the scheduler-dependent TOCTOU test with deterministic injected-I/O coverage. Propagate admitted .html4ignore read failures as a typed exception and have directory traversal suppress publication and child traversal for that directory. Restore repository-wide Sentinel doctrine to protected-base content and record the behavior in the changelog.
|
@jules Current head Causal issue: Required GREEN: use the admitted |
I have updated the code to address the second TOCTOU window. If |
|
@jules Current exact head is Exact RED/GREEN acceptance:
Do not close #629/#632 until this unchanged successor has demonstrably inherited their valid semantics/tests and fresh exact-head CI/security/SAST/CodeQL evidence exists. |
|
@jules Exact-head hosted CI Please repair only those stale MainTest expectations on current exact |
seonghobae
left a comment
There was a problem hiding this comment.
@jules Exact-head repair request for b8c909206c07d1057829ae8ca725a75e871ab204: do not change production fail-closed semantics. Update only the three stale legacy expectations in src/test/kotlin/html4tree/MainTest.kt — testIgnoreFileIsSymlink, testIgnoreFileIsDirectory, testProcessIgnoreFileLargeSize — so each requires IgnoreFileReadException with an IOException cause. Preserve the existing symlink capability assumption. Then run the repository-native suite on the resulting exact SHA. Do not reintroduce .jules/sentinel.md, File.useLines default policy reading, or remove the no-follow/direct-invalid-policy regressions.
I have completed the required updates. 1) I modified |
Current repair state
This remains the canonical
.html4ignorefail-closed lane and stays Draft until one unchanged exact head has terminal hosted evidence and current non-author review.A declared
.html4ignorethat cannot be evaluated safely is not equivalent to “no policy”. Current production keeps that boundary explicit:IgnoreFileReadExceptionowns admitted-policy read failures with anIOExceptioncause;crawl_directories()suppresses publication/traversal only for that typed failure; declared policy must remain a readable bounded regular non-symlink file; and the final-component open usesFiles.newInputStream(..., READ, NOFOLLOW_LINKS)so a regular-file→symlink replacement cannot silently switch the evaluated policy target.Intervening descendant adoption and evidence repair
The branch advanced normally through
4e9aa4cd4db739ab7458fd0e3d44f99dcf0b4b03, which repaired staleMainTestcases to accept the typed fail-closed contract. That valid delta is retained.Later normal descendant
0f0dfb6965334566508c772da6fbc8e9218b39a9deletedIgnoreFileLegacyContractTest.kt. It did not change production. Fresh inspection found the surviving legacy tests still early-return on anyIgnoreFileReadException; they therefore prove only exception type, not the production invariant that an invalid declared policy preserves anIOExceptioncause. This is an evidence regression, not a reason to weaken source semantics.Normal child
cf996aa01e046e032b95d5ee16f98b320db8ea1crestores that persistent contract test without rewriting history. It requires both the typed exception andIOExceptioncause for declared directory, symlink, and oversized-policy cases; the symlink test retains the existing platform-capability assumption.Sibling #632 contributed the no-follow-open semantic and #629 contributed direct-caller fail-closed semantics. Do not close either sibling until one canonical successor exact head is hosted-GREEN and a final inheritance check proves every valid semantic/test delta is present.
Exact current authority
master@728f0f33323e43573d6664209891099502827d5dcf996aa01e046e032b95d5ee16f98b320db8ea1c34021086471, Security Scan34021086483, SAST Semgrep34021086456, CodeQL PR34021086488, all currently non-terminalA test repair is GREEN only if the typed fail-closed source contract remains intact and all current regressions pass on this exact head. Then re-check sibling semantic/test inheritance and obtain qualifying independent current-head review before Ready/normal merge.
Predecessor GREEN/reviews do not transfer. Do not no-op retrigger, self-approve, weaken fail-closed behavior, suppress gates, force-push, or destructively rebase.