Skip to content

fix(api): keep anonymous submitter handles private - #115

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
dvd233:fix/anonymous-submitter-handle-102
Sep 13, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
dvd233:fix/anonymous-submitter-handle-102

Conversation

@dvd233

@dvd233 dvd233 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

What & why

is_anonymous controls whether a submission's author identity is public, but the create and edit routes still persisted a supplied handle when it was set to true. The public post mapper also returned handles from legacy anonymous rows, so a direct API consumer could recover an identity the submitter intended to hide.

Closes #102

Changes

  • Drop submitter_handle on create and edit whenever is_anonymous is true.
  • Hide legacy handles in the public post mapper while preserving handles for attributed posts.
  • Add regression coverage for create, edit, legacy public reads, and the non-anonymous path.

Testing

  • pnpm exec vitest run — 145 tests across 16 files passed.
  • pnpm run lint — passed with no warnings or errors.
  • pnpm exec tsc --noEmit — passed.
  • Prettier check and git diff --check — passed.
  • pnpm run build was attempted with local placeholder environment values. Compilation and type checking passed, but Next.js 14.2.35 failed while prerendering the existing /icon and /apple-icon routes on native Windows with TypeError: Invalid URL from next/og. No icon or build configuration files are part of this change.

@royalpinto007
royalpinto007 merged commit b7f3a69 into AgentPostmortem:main Sep 13, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown

Merged. Thanks a lot, @dvd233.

agentpostmortem gets better every time someone outside the repo digs in like this.

If you find agentpostmortem useful, consider dropping a star. It helps more people find it.

Happy to see more from you whenever you have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anonymous submissions retain submitter_handle and the API returns it

2 participants