Repository navigation
Backends v3.0.0: contract v3 hierarchy, PostgresStore, per-app proxy, app-token trust, one-run import - #27
Merged
Merged
Conversation
…dentity, import_reports; Node v3 fields One central store for every app's reports: triage fields, votes, filters, product/app. Contract v3 adds to v2 and removes nothing. Also fixes a flaky unhandledRejection in backend-node's FilesystemStore constructor (3/25 failures on main, 0/40 after). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at raises on drift, no lost update, review cleanups - trusted_caller/TrustedCallers: a bearer token is required on every request (401); no gateway-principal or Tailscale fallback; identity loopback_headers defaults off. - import_reports: app must be in APP_PRODUCTS; a second run compares each present report and raises ImportMismatch (ids) writing nothing; no resume. - Store.update_bug: atomic (Postgres SELECT FOR UPDATE + one UPDATE; filesystem per-id lock). - Proxy refuses .. segments and has generic 502 bodies; Postgres list filters on added_at; list filters and the wire/attribute map come from the contract; spec-drift test is two-way. - docs/CENTRAL-STORE.md: no gateway route, LeapHQ calls as its own identity, one-run import, PyJWT; Ken's two assumptions marked still assumed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.
This is the library step of docs/CENTRAL-STORE.md (#26). Everything here is library code; no service exists yet.
What it adds
product(fromapp), storedkind,area,priority(now/next/later),owner,parentId,duplicateOfandvotes.duplicateOfalso declines the report with the note "duplicate of …".POST/DELETE /<id>/vote.app,kind,area,priority.bug_report.pg.PostgresStore(extra[postgres]), ported from the fleet dashboard's production store. A triage PATCH is one transaction with the row locked (SELECT … FOR UPDATE).create_proxy_blueprint: an app's/api/bugsforwards every route to the central service. It sends the app's own token and the signed-in person, refuses..in paths, and returns a generic 502 when the service can't be reached.trusted_caller/TrustedCallers: every request must carry an app token, checked by averify_tokenthe service supplies.appis taken from the token; a disagreeingX-Leap-Appis ignored, and the response says so.bug_report.identity:trusted_person()moves in from the apps;loopback_headersis off by default.import_reportsis one run at cutover (Ken). A second run compares the reports already copied and raisesImportMismatch(ids)on any difference, writing nothing. It refuses app names the contract doesn't know.Tests (rerun by the coordinator in a fresh venv installed the way the README says, T7)
postgres:16service. Without it the Postgres tests skip locally but fail underCI=true(T6).End-of-implementation review (T1) was done by a fresh reviewer that saw only the diff.
effective_kindandapply_changesreused;Caller.viadeleted;sincefiltered on the indexed column.Also fixed (T17):
backend-node/tests/router.test.jsfailed 3 times in 25 on unchanged main. The cause was an unhandled rejection from the FilesystemStore'smkdirracing test cleanup. A one-line fix; it then failed 0 times in 40.Tag
backends-v3.0.0after merge.🤖 Generated with Claude Code