docs(cookbook): address review - use sequence_id in lineage walk, demonstrate verify_chain in tamper-evidence step

Signed-off-by: LeonSGP43 <leonsgp43@users.noreply.github.com>
This commit is contained in:
LeonSGP43
2026-08-16 11:52:43 +08:00
parent 21edb700b2
commit aee6e5ad9c
@@ -129,7 +129,7 @@
"\n",
"print(\"\\n--- ordered chain ---\")\n",
"for e in prov.trace_lineage(\"claim_biomass_increase\"):\n",
" print(f\"{e.entity_id} | v{getattr(e, 'version', '?')} | {e.activity_id}\")"
" print(f\"{e.entity_id} | seq#{e.sequence_id} | {e.activity_id}\")"
]
},
{
@@ -200,7 +200,9 @@
"print(\"Checksum verified:\", ok)\n",
"\n",
"print(\"Computed:\", compute_checksum(entry_biomass)[:16], \"...\")\n",
"print(\"Stored: \", entry_biomass.checksum[:16] if getattr(entry_biomass, 'checksum', None) else \"(see entry fields)\")"
"print(\"Stored: \", entry_biomass.checksum[:16] if getattr(entry_biomass, 'checksum', None) else \"(see entry fields)\")\n",
"chain = prov.verify_chain()\n",
"print(\"Chain verification:\", json.dumps(chain, default=str)[:200])\n"
]
},
{