Skip to content

fix: reject section-marker addresses and numbered page footers - #403

Merged
jan-kubica merged 9 commits into
mainfrom
cursor/czech-registry-anonymization-quality-b3a0
Jul 26, 2026
Merged

fix: reject section-marker addresses and numbered page footers#403
jan-kubica merged 9 commits into
mainfrom
cursor/czech-registry-anonymization-quality-b3a0

Conversation

@cursor

@cursor cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevent document scaffolding from surviving as PII:

  • reject explicit section markers such as § 6, 6.1, and 3.2.4 when a trigger misclassifies them as addresses;
  • reject line-isolated, bounded standalone and page/total counters when a trigger misclassifies them as organizations;
  • keep page/footer vocabulary scoped to the configured content languages.

The footer matrix covers all 13 languages in language-scopes.json: Czech, German, English, Spanish, French, Hungarian, Italian, Latvian, Polish, Brazilian Portuguese, Romanian, Slovak, and Swedish. Czech includes Strana, Strany, and Stran celkem; common localized punctuation such as Oldal: 1 (összesen: 7) and Oldal 1 / 2 is also supported. A coverage invariant fails when a supported language lacks reviewed footer vocabulary.

The new filter field is threaded through the core, adapter, N-API, and TypeScript surfaces. It remains optional in the public TypeScript structural type for patch-release source compatibility. Binding and core prepared-package schemas advance from v5 to v6 so older positional payloads fail closed and are rebuilt.

The added filter set also exposed an existing near-limit stack frame in the shared package loader. Its core-package and binding-package decode paths are now separate private helpers, reducing peak stack allocation without changing the public API or suppressing the safety lint.

Safety boundaries

  • Bare numeric address values remain valid house numbers.
  • A single dotted number is rejected only with line-heading context; sentence-final Czech house numbers and Spanish postal codes remain PII.
  • Role-shaped names such as Studio 54 (Group 100) remain detectable.
  • Ordinary municipality captures remain unchanged.
  • Footer rejection requires an isolated line, a configured language marker, consistent page/total bounds, and a maximum total of 1,000.
  • IP address handling remains unchanged.

Validation

  • full bun run build --filter=@stll/anonymize --force production build, including Rust release, N-API, WASM, and prepared packages;
  • exact full-config assemble parity and all frozen package digests;
  • binding/core package round-trips and explicit v5 rejection;
  • strict core and adapter Clippy;
  • exact workspace cargo ci-fmt and cargo ci-clippy;
  • binding-core unit tests;
  • focused core and 13-language adapter regressions;
  • bun test packages/anonymize/src/__test__/document-scaffold-fp.test.ts;
  • bun run lint;
  • bun run format:check;
  • bun run typecheck;
  • bun run check:version;
  • pre-push fast tests, typechecks, formatting, and generated-instruction checks.

No raw source document or evaluation output is included.

CC on behalf of @jan-kubica

@jan-kubica
jan-kubica force-pushed the cursor/czech-registry-anonymization-quality-b3a0 branch from b85d184 to 586fc74 Compare July 26, 2026 06:20
@jan-kubica jan-kubica changed the title fix: reject section-marker addresses and role+number orgs fix: reject section-marker addresses and numbered page footers Jul 26, 2026
@jan-kubica
jan-kubica marked this pull request as ready for review July 26, 2026 06:21
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 586fc74f5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs
@jan-kubica
jan-kubica force-pushed the cursor/czech-registry-anonymization-quality-b3a0 branch from 586fc74 to b1314c1 Compare July 26, 2026 06:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1314c1c44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
Comment thread crates/anonymize-core/src/false_positives.rs Outdated
@jan-kubica
jan-kubica force-pushed the cursor/czech-registry-anonymization-quality-b3a0 branch from b1314c1 to 2c9d300 Compare July 26, 2026 08:38
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@jan-kubica
jan-kubica force-pushed the cursor/czech-registry-anonymization-quality-b3a0 branch from 2c9d300 to 29ca92f Compare July 26, 2026 08:41
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29ca92f7b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5aca8909f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
Comment thread packages/anonymize/src/native-search-config.ts Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 697faf866e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 996c108731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42d58a62d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36148a5193

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/false_positives.rs Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 295f278813

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/resolution/document.rs Outdated
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8eb3fc83fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/anonymize-core/src/resolution/document.rs
@jan-kubica

Copy link
Copy Markdown
Contributor

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 89cfab6d31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jan-kubica
jan-kubica merged commit d3363c3 into main Jul 26, 2026
15 checks passed
@jan-kubica
jan-kubica deleted the cursor/czech-registry-anonymization-quality-b3a0 branch July 26, 2026 10:44
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant