Repository navigation
Document target choice and output verification, redraw the logo - #1
Merged
Merged
Conversation
The README made three claims a reader had no way to check, and a few that were wrong. Reviewed the whole file against the code and fixed what did not hold up. Corrections, all verified by running them: - "warnings is empty when nothing was skipped" was false. patterns-only, and text mode with only visual targets, skip every model target in silence. Say so, and point at detectionCounts instead. - redact-identifying matches on URL host with no judgement, so an employer linking to its LinkedIn company page loses its name while one linking to its own domain keeps it. Measured on a real CV: "Embeddings Co" and "Aspora (Vance)" go, "CloudSEK" stays. It also only ever fires for targets that have patterns, so it is a no-op on a model-only target set. - phone does not take the "Mobile:" label with it. The prompt tells the model the opposite of what the table claimed. - grid default is an object, not "24x36". ocrLanguage was missing. - The size figures were not reproducible. Replaced with measured numbers. - npm test compiles to dist-test, not dist. - A provider adapter is about a hundred lines, not forty. Additions: - Checking the output: how to verify the three claims, with real command output. 379 text items and 21 links in, 0 and 0 out. - What throws and what warns, because a throw means no PDF at all and a batch caller cannot work that out from prose. - Found by column on the targets table, and a Choosing targets section: employer and school need a provider, and leaving them off is a choice. - Calls scale with pages, not findings, so a three page CV with photo is six calls rather than two. - A page with no text layer and neither OCR nor vision comes back unredacted. This is the quietest way to get a useless result. - Named the alternatives instead of implying there are none. The re-identification limitation moves from a footnote to the top. Blacking out the contact block is the easy half; a distinctive project or metric is one search from a name and no target matches it. Keywords say pseudonymisation now, because anonymisation is not what this does. Visuals: a before and after built from the test fixture, and the four detection layers as a diagram. Both carry their own light ground so they hold up on either GitHub theme. The logo was a text-file icon. Three bars inset from both page margins is how every document glyph has been drawn for thirty years, and at 16px that is all it said. Two bars now, uneven, running past the page edge the way ink applied afterwards does not respect the text block, with every value on a multiple of 8 so the edges land on whole pixels down to 16px. Same container, page, fold and palette as rsparse. Signed-off-by: Govind Pandey <govindup63@gmail.com>
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.
What this is
A pass over the README against the actual code, plus two visuals and a redrawn logo. No source changes.
Four agents reviewed the repo: code, docs and usefulness, and the logo from a craft lens and a concept lens. This PR applies the documentation findings. The code findings are listed at the bottom and are not addressed here.
Corrections, each verified by running it
warningsis empty when nothing was skipped"patterns-only, andtextmode with only visual targets, skip every model target in silence.{targets:['name','address','photo','email'], mode:'patterns-only'}returnswarnings: []and finds only the email.redact-identifyingleaves "an employer's site alone"linkedin.com/company/...; "CloudSEK" survives because it links tocloudsek.com. It also only fires for targets that have patterns, so it is a no-op on['name','photo'].phoneredacts "with their labels"prompts.tstells the model the opposite.griddefault24x36{ cols: 24, rows: 36, opacity: 0.35, snapToWords: true }.ocrLanguagedist-test.customProvider.Added
employerandschoolneed a provider, and leaving them off is a deliberate trade rather than an oversight.photois six calls, not two.pseudonymisation.Visuals
Both carry their own light ground, so they hold on either GitHub theme.
assets/redaction-example.png— before and after, generated from the repo's own test fixture, so there is no real PII in it.assets/pipeline.svg— the four detection layers, with which ones cost a model call.Logo
Both design reviewers independently concluded the same thing: three bars inset from both page margins is the universal "lines of text" glyph, so at 32px and below the mark read as
file-text, not as redaction. It collided with TextEdit, Materialdescription, Lucidefile-text, Font Awesomefile-lines, and the GitHub file octicon.They disagreed on the fix. The concept reviewer wanted a negative-space hole; the craft reviewer argued a rectangular hole reads as a gap. I built both and rendered them at 16/32/48/96/256 on both themes: the hole goes ambiguous below 48px and reads as an odd silhouette, so the ink version won on the evidence.
Two bars now, uneven, running past the page edge, because ink applied afterwards does not respect the text block. Every value is a multiple of 8 so the edges land on whole pixels down to 16px. Container, page, fold and palette are unchanged, so it still reads as rsparse's sibling.
Code findings from the review, NOT in this PR
Verified defects, worth separate issues. Most severe first:
document/pdf.ts:135). Text drawn at 90 degrees, as sidebar CV templates do for the name, has its rotation discarded. Measured overlap between the box and the glyphs: under 2%. The name stays readable andwarningsis empty.detect/llm-text.ts:69).{},null, a refusal string, and a sub-minConfidencedetection all yield zero detections and zero warnings.redact-identifyingruns target regexes over URLs without the false-positive guards (detect/links.ts:31). Withtargets:['phone'], 14 of 21 links on a real CV matchedPHONEvia digits in the path, wiping the whole certifications section.buildLinesfabricates a space between adjacent runs (detect/lines.ts:33). An email split across runs stops matching, and in two-column layouts one box spans the gutter.urlfalse positives:deploy.sh,socket.io,Node.js/Express,Makefile.inall redact.DOBmatches the bare word "born" and sweeps the following 40 characters.advance-widths.tsindexes by code point while the cursor indexes by UTF-16 code unit, so one emoji in a run shifts every later box (measured 17px).Y5produce a zero-width box that is dropped with no warning."an"produced 48 boxes on one page.dpi: 0anddpi: -150return a degenerate PDF and report success;Uint8Arrayinput is rejected with a misleading error.Tests still 13/13,
typecheckclean.