Skip to content

[Remove] site registry formatter alias - #438

Merged
juanmaguitar merged 2 commits into
trunkfrom
juanmaguitar/cleanup-430
Sep 11, 2026
Merged

[Remove] site registry formatter alias#438
juanmaguitar merged 2 commits into
trunkfrom
juanmaguitar/cleanup-430

Conversation

@juanmaguitar

Copy link
Copy Markdown
Collaborator

Why

site-registry only forwarded refused paths to the shared safe-log.describeRefused() formatter. That alias duplicated the formatter API and its direct formatter tests without providing site-registry-specific behaviour.

What changes

Refusal paths in the delete, reveal, and debug-log guards now call describeRefused() directly. The local alias/export and its formatter-only assertions are removed; behaviour-level refusal coverage, including the newline-forgery case, remains.

How to test this

Platforms: any — this is a Node-only refactor with no user-visible surface.

Starting state:

  1. Install the repository dependencies.

  2. Run node --test tests/unit/site-registry.test.cjs; all 16 tests pass, including the rejected-path newline-forgery behaviour.

  3. Run npm run lint and npm test; both complete successfully.

What must not have happened:

No registry refusal may reach its injected logger with an unescaped newline, and no delete, reveal, or debug-log operation may gain access to an unregistered path.

Risks and limitations

Low risk: the changed call sites retain the same shared formatter and the refusal-behaviour test remains. Independent self-review found 1 [fix here] architecture documentation issue in src/logging.js: its comment still names the removed alias; this PR intentionally leaves it untouched because #430 is explicitly scoped to src/site-registry.js and its unit test.

Related

Fixes #430


Design decisions and alternatives considered

Inlining preserves the single safe formatter in safe-log.js and removes an API that added no registry-specific meaning. The formatter module's own tests remain the source of truth for escaping and truncation.

Review outcome (required — see AGENTS.md)

1 [fix here] · 0 [follow-up] — no functional findings; the one documentation finding is deferred because the task explicitly restricts the change to two files.

Implementation notes

Validation passed: node --test tests/unit/site-registry.test.cjs (16 tests), npm run lint, and npm test (1,255 tests). The pre-existing uncommitted package-lock.json change was not staged or included.

@juanmaguitar juanmaguitar added the audit-code Follow-up work from the codebase audit label Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0125a221-f8bd-4b0a-acc8-9a280e3a66f0

📥 Commits

Reviewing files that changed from the base of the PR and between f7f6069 and 6bb5c0d.

📒 Files selected for processing (2)
  • src/site-registry.js
  • tests/unit/site-registry.test.cjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@juanmaguitar

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@juanmaguitar

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@juanmaguitar
juanmaguitar force-pushed the juanmaguitar/cleanup-430 branch 4 times, most recently from 04a53e4 to de3f2fc Compare September 11, 2026 04:11
@juanmaguitar
juanmaguitar force-pushed the juanmaguitar/cleanup-430 branch from de3f2fc to d74dd38 Compare September 11, 2026 04:16
@juanmaguitar

Copy link
Copy Markdown
Collaborator Author

Self-review completed: 0 [fix here], 0 functional [follow-up]. Fresh independent judgement verified shared formatting and site-refusal integration coverage remain. Local lint and all 1,248 tests pass on Node 24.18.0. The stale logging comment is corrected in #440. CodeRabbit has no inline findings; attempts are rate limited.

@juanmaguitar
juanmaguitar merged commit 0ce7495 into trunk Sep 11, 2026
8 checks passed
@juanmaguitar
juanmaguitar deleted the juanmaguitar/cleanup-430 branch September 11, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-code Follow-up work from the codebase audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the site-registry formatter alias

1 participant