Phase 1: backend core (models, sinks, mountable ingest router)#10
Merged
Conversation
…ing seams) Deterministic, dependency-injected backend spine: - base.py: Pydantic SSOT (Report/ReportSubmission/Identity/Environment/Status/...) - sinks/: Sink protocol + StoreSink (default) + GitHubIssuesSink (injected create_issue, lazy ghapi, image-attachment-aware markdown body) - ingest.py: process_submission core + mountable FastAPI router + make_app - security.py: origin allow-list + in-memory rate-limiter seams - storage.py / config.py: dol-backed stores + HeedConfig - 9 tests (model round-trip, sinks, ingest core + router, origin block); ruff-clean - CI workflow stub (wads uv reusable); publish disabled during design phase Privacy by default: opt-in console/network dropped unless config enables. Refs #2 #3 #4 #5 Claude-Session: https://claude.ai/code/session_01TH3XxQ8qW36Dh3eCVjX1PA
This was referenced Jun 21, 2026
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.
Implements the Phase 1 deterministic backend spine — the testable, framework-free core plus a mountable FastAPI surface. Closes the backend portion of #2, #3, #4 and the seam-level part of #5.
What's in
base.py— Pydantic SSOT:Report/ReportSubmission/Identity/Environment/Category/Status/Attachment/LogEntry/NetEntry. ([P1] Report data model (Pydantic SSOT in base.py) #2)sinks/—Sinkprotocol +BaseSink;StoreSink(dol/dict default) andGitHubIssuesSinkwith a dependency-injectedcreate_issue(testable, no network), lazyghapifactory, and image-attachment-aware markdown rendering (no GitHub attach API → embed a URL). ([P1] Sink protocol + GitHubIssuesSink #3)ingest.py—process_submission(pure core; server owns id/created_at/identity/origin/status) +make_router(mountableAPIRouter,include_routerinto enlace,user_dependencyseam for enlace_auth) +make_app. ([P1] Mountable FastAPI ingest router #4)security.py— origin allow-list + in-memory fixed-window rate limiter behind aRateLimiterprotocol. ([P1] Public-endpoint hardening (unauthenticated ingest) #5 seams; Turnstile/Redis still open)config.py/storage.py—HeedConfig+ dol-backed report/attachment stores.[tool.wads.ci.publish] enabled = false(design phase, no PyPI publish on merge).Design adherence
Standalone (no enlace import at load), pluggable sinks (strategy), privacy-by-default (opt-in console/network dropped unless
HeedConfigenables), no secrets in the browser (server brokers GitHub). Seemisc/docs/design.mdand Discussion #1.Tests
9 tests pass (model round-trip, both sinks, ingest core + router happy-path, origin-block); ruff format + lint clean.
Deferred (follow-ups)
Widget #6 · opt-in capture + masking + consent #6/#7 · AI triage + dedup + MCP #7 · full hardening (Turnstile/Redis/payload moderation) #5 · unified-inbox UX #9.
https://claude.ai/code/session_01TH3XxQ8qW36Dh3eCVjX1PA