Repository navigation
feat(fto): claim charts with manual per-feature findings (ADR 0011) - #23
Merged
Merged
Conversation
Connects the pieces: one chart = one patent's claims x one confirmed
product feature set. A person confirms claim features and records
per-feature findings; claim-level conclusions are derived on read with
the exact all-elements algorithm (ADR 0008). Findings are manual only, as
decided; there are no automated suggestions.
- Creating a chart snapshots the latest fetched claim document: claim
numbers, dependencies, feature texts and spans, parser id, claims-text
SHA-256, what the text represents, and parse warnings. The chart stays
tied to the text and parse it was built from even after re-fetches or
parser changes. Requires a confirmed product set from the same case;
claims not yet fetched return 409 (no external calls in the request
path).
- Input rules (service and DB CHECKs): present findings must cite
product feature codes from the chart's product set; equivalent and
absent findings need a rationale. Equivalence is a supplied judgment,
never computed.
- Every chart response carries caveats: US text is as granted
(reexamination, IPR and corrections not reflected), EP text may be a
translation, conclusions are not a legal opinion.
- Storage (0022, tenant FORCE RLS): fto_charts and fto_feature_findings
are append-only (finding history kept; latest wins).
fto_chart_claim_features text is frozen: runtime roles may update only
the confirmation columns, and a trigger forbids revoking a confirmation.
- API under /cases/{case}/fto/charts: create, list, get (with
conclusions), confirm a claim's features, record a finding, finding
history. Audit summaries hold ids, claim numbers and finding values
only; no claim text, product text or rationale.
Tests: 2 Postgres integration tests through the real app (guards;
undetermined -> reads_literally after confirmation -> does_not_read with
an absent feature, inherited by the dependent claim; input rules;
history; caveats; wrong case; other tenant; audit privacy; DB
immutability). Mutation check: treating unconfirmed features as confirmed
fails the flow test.
Co-Authored-By: Claude Opus 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.
What
The comparison itself (ADR 0011). One chart = one patent's claims × one confirmed product feature set.
Design points
CHECKconstraints:literally_present/present_by_equivalentmust cite product feature codes from the chart's own product setpresent_by_equivalent/absentneed a rationaleStorage (tenant data, FORCE RLS)
fto_chartsfto_chart_claim_featuresfto_feature_findingsAPI —
/cases/{case}/fto/chartsCreate · list · get (with conclusions and the features found absent) · confirm a claim's features · record a finding · finding history.
Audit summaries contain IDs, claim numbers and finding values only: no claim text, product text or rationale.
Tests
2 Postgres integration tests through the real app:
reads_literallyafter confirmation →does_not_readonce a feature is absent, inherited by the dependent claimMutation check: treating unconfirmed features as confirmed fails the flow test.
Validation
./scripts/test-postgres.sh: 121 passed (+2).venv/bin/pytest apps/api/tests/unit/: 423 passedpnpm test:web: 66 passed;pnpm build:web: okverify-source-lock,verify-scaffold,verify-p0-02,verify-p0-e2e,docker compose config: ok🤖 Generated with Claude Code