Repository navigation
Trust & Ops: forensic integrity checks + grammar-drift hotfix kit #23
peopleofproduct
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Trust & Ops — forensic integrity + grammar-drift hotfix kit
This release ships the two capabilities operators asked for: detect and explain suspicious/tampered statements, and a minutes-not-days response when a bank changes its narration format.
@paniniapi/forensics(0.1.0, new package)Deterministic document-integrity forensics for statement files.
inspectStatement(bytes)returns an explainableIntegrityReport(verdict + rule-Id'd signals + evidence):/Producerfingerprints, post-periodModDate, AcroForm overlays, covering annotations, invisible text, stacked/overtyped fragments./ByteRangedigest vs CMSmessageDigest, RSA-PKCS#1/ECDSA signature over signedAttrs (node:crypto), embedded cert chain walked to a caller-supplied trust store. Post-sign appends flagged.@paniniapi/bsacarries per-fileintegrityverdicts in the JSON report, a Document Integrity section in Markdown output, a--no-forensicsflag, and exit code3ontamper_evidence(CI-gateable).Docs:
docs/statement-integrity.md— signal dictionary, verdict semantics, honest limits (deterministic evidence ≠ ML forensics; AA-sourced data remains the tamper-proof channel).Grammar-drift response kit (
@paniniapi/rules-engine)The operational answer to "the bank changed its narration format overnight":
analyzeNarrationBatch(narrations, { bankHint })— batch match-rate / confidence vs the corpus baseline;drift: true+ warnings when the rate collapses (>20pp default, tunable). Unmatched narrations are grouped into token-skeleton clusters so operators see the new shape, not thousands of raw strings.suggestGrammarRule(samples)— drafts a candidateGrammarPatternfrom same-skeleton samples and self-tests it against the whole corpus (corpusImpact,safeflag). Suggestions never mutate production grammars; they are paste-ready drafts for human review.panini-bsa doctor <files...> [--bank id]— CLI that runs the drift report on statement files or one-per-line.txtdumps and prints a draft rule per unmatched cluster. Exit1on drift.docs/rules-hotpatch.md— the full detect → diagnose → overlay-patch → upstream playbook. Grammar fixes ship as JSON rule files vialoadRuleSets(dir)— no engine redeploy required.panini-parser0.3.3 (Python parity)The same drift kit on the Python engine:
analyze_narration_batch,corpus_baseline,skeleton_of,suggest_grammar_rule(identical corpus self-test), plusparse_narration(..., rule_sets=[...], bare=True)mirroring the TS overlay options. Corpus fixtures now ship inside the wheel, guarded by a bundled-drift test.Also in this release
@paniniapi/extract) — SheetJS no longer requiredschema_version: 2):category_source,category_id/group,counterparty_kind,ref_kindids + rollupgroups (taxonomy.json)Gates: 986 TypeScript + 136 Python tests, lint/format/bench/pin checks green. Deterministic, zero-egress, Apache-2.0.
This discussion was created from the release Trust & Ops: forensic integrity checks + grammar-drift hotfix kit.
All reactions