Skip to content

feat(ledger): flow candidates, classification stats, and accepting suggestions in bulk - #251

Merged
jfrench9 merged 1 commit into
mainfrom
feature/classification-batch
Oct 14, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
feature/classification-batch

Conversation

@jfrench9

Copy link
Copy Markdown
Member

What

The Python equivalent of typescript-client #267 (v2.12.1) and #268, which went out without it.

  • get_flow_candidates(graph_id, entity_id=) → flowCandidates: the leaf investing and financing rows of the entity's cash flow statement, the set a bank line's classified_flow_qname may take.
  • get_classification_stats(graph_id, period, entity_id=) → classificationStats: per suggestion source, lines accepted, overridden, split or chosen with no suggestion; the share that needed a person; unstamped for lines posted before outcomes were recorded; None when the ledger is not initialized.
  • accept_suggestions(graph_id, body=) → the accept-suggestions operation: filters, explicit event_ids, commit, dry_run, limit; the result carries the counts, truncated, and every line with its outcome or skip reason.
  • Operation documents FlowCandidates.graphql and ClassificationStats.graphql; schema.graphql refreshed; graphql/generated regenerated (the drift gate is clean); api/ and models/ regenerated from the local stack on robosystems #1800. Beyond the new operation and its models, the regenerated diff is comment strings on existing request models.

Waits on

The server read and operation ship in the next robosystems release after v1.16.16, carrying #1799 (flowCandidates) and #1800 (classificationStats, accept-suggestions). Until it is in prod, the two reads fail GraphQL validation there and the operation answers 404.

Additive: a minor. No stable-tier change; the integration template's emit symbols are untouched.

Tests

6 new in tests/test_ledger_client.py: the flow rows and the entity default, the stats shape and the null case, the batch's body and result, and the empty-body default. just lint, just typecheck, just test: 687 passed, 17 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Wxgk4yttBxgdE2uBHT71R

…ggestions in bulk

Brings the Python client level with the TypeScript client's last two
pushes. `get_flow_candidates` reads the cash flow rows a line may be
tagged with under the entity's Reporting Style. `get_classification_stats`
reads how a month's bank lines were classified per suggestion source, with
the share that needed a person's choice. `accept_suggestions` takes the
suggestion on every open bank line the filters select, posting too with
`commit`, and answers every line with its outcome or the reason it was
skipped.

SDK and schema regenerated against the local stack running robosystems
#1800; the other drift is comment strings on existing models.

Claude-Session: https://claude.ai/code/session_014Wxgk4yttBxgdE2uBHT71R
@jfrench9
jfrench9 merged commit 5a3474a into main Oct 14, 2026
4 checks passed
@jfrench9
jfrench9 deleted the feature/classification-batch branch October 14, 2026 16:17
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.

1 participant