Repository navigation
fix: protect CLI sources and recipes, keep explicit reloads, report secret scans - #274
Merged
Merged
Conversation
…ecret scans - Ignore the trailing "/" that NSString.pathComponents reports for a symlink target ending in a slash; it reset canonical paths to the root, so `--out link/notes.md` with `link -> dir/` replaced the source with a PNG. - Claim the --recipe file as a protected resource for outputs and batch reports, and exclude it from batch discovery. - A live-file poll observes an in-flight explicit reload instead of cancelling it. - Show the secret-scan summary while its redactions still apply; localize the inspector's Format and Destination tooltips. - Correct the --copy description for PDF outputs. - CI: fall back to the parent commit when a force push leaves `before` outside the pushed history, instead of failing coverage setup.
- Extract SecretScanReport so the summary visibility rule is unit-tested. - Share the destination tooltip copy between the editor and Settings. - Drop fileReadIsReload resets that only run once fileReadTask is nil. - Note in CI when diff coverage falls back to the last commit. - Correct the recipePath doc: batch discovery also excludes the recipe.
The editor's scan replaced the redacted lines with its own result, so a line redacted by hand that the scanner does not detect was exported in plain text. Merge the detected lines into the existing redactions, as --redact-secrets already does.
A batch rendered into its input folder treated its earlier outputs as sources on the next run: the earlier image was claimed as an input and the run failed with an output conflict, and earlier sidecars were rendered as new cards under renamed outputs. An earlier image is now a non-text file exactly where the run writes an image, and an earlier sidecar sits beside one where the run writes that sidecar (Markdown and HTML must also reference the image). Anything ambiguous stays a source and keeps failing closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up review of everything merged since 2026-10-06 (#251–#271).
Fixes
NSString.pathComponentsreports a link target ending in/(../out/, tab-completed paths) with a final"/"component, whichcanonicalPathtreated as the root. Later components were then keyed from/, sorender dir/notes.md --out link/notes.mdwithlink -> dir/passed the input guard and replacednotes.mdwith a PNG. Batch collisions through such aliases also went unnoticed.--recipewas not protected.render a.swift --recipe team.json --out team.jsonwrote a PNG over the recipe, and a batch rendered a recipe that sat inside its input folder. The recipe now joins the background image and watermark logo as a protected resource, and batch discovery excludes it.onChange(isEmpty)cleared it right away. The summary now stays visible while the redactions it describes still apply.--copydescription no longer says that a PDF--outcopies “the same image”. A PDF gets its own PNG render.beforeSHA no longer existed, sogit rev-parsefailed coverage setup on main (bd4a4cb). Whenbeforeis not an ancestor of the pushed commit, the job now diffs against the parent. Pull requests still use their base SHA, fail-closed.Verification
CLIOutputContractTests(trailing-slash links, relative and absolute),CLIInputSafetyTests(source preserved end to end),CLIRecipeTests(render and batch),CLIBatchArtifactTests(in-place rerun with and without sidecars,--no-overwrite, a real Markdown source beside an unrelated image),LivingSnapshotSessionTests.aPollCannotCancelAnExplicitReload.make lint,make test(full suite) andcd site && npm testall pass locally.Review follow-up (5c8755b)
SecretScanReportholds the scan summary rule, with a unit test that fails if the summary is cleared while its redactions still apply.ExportPreset.localizedHelp(for:)).fileReadIsReloadresets that only ran oncefileReadTaskwas already nil;aPollCannotCancelAnExplicitReloadstill fails without the guard.make lint,make test(full suite). Hosted run: 38484840076.Review follow-up (5add230)
--redact-secrets.aScanKeepsRedactionsTheUserAddedByHandfails without the merge.make lint,make test(full suite). Hosted run 38493433939 on 7836e83: the first Sequoia attempt failed only uploading performance evidence (ENOTFOUND); every test had passed, and the rerun of that job passed.