Repository navigation
fix(artifacts): keep reading KPI payloads frozen before contributor labels - #251
Merged
Merged
Conversation
…abels A kpi:v1 payload captured before its contributors carried run_label, sample_role and block_label no longer validated under artifact-payload-1, so the demo report showed three of its items as unsupported. The three fields are optional on read on both sides. A contributor without them re-serializes without them, so its stored payload hash still holds, and the renderer names it by its run ID. A shared fixture of the earlier shape pins it. Fixes #249
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 changes
A
kpi:v1payload frozen before its contributors carriedrun_label,sample_roleandblock_labelis supported again underartifact-payload-1(option 1 of #249).KpiContributoraccepts a contributor without the three fields. It serializes without them, so the re-serialized payload still hashes to the storedpayload_hashthat a publication pin checks. A contributor written today still carries all three, including a null role.run_labelby its run ID. A contributor withoutsample_rolegets no role line, because "No planned unit" would claim something the payload never recorded.kpi-v1-before-run-labels.jsonis the earlier shape, with a pinned digest. Both sides read it.docs/contracts/artifacts.mdstates the rule and lists the fixture.Tests
test_artifact_payload_fixtures.py: every supported fixture validates and now also re-serializes to its pinned digest. It fails if the earlier KPI shape is refused, or if it re-serializes with fields it never had.artifacts.schema.test.tsaccepts the new fixture through the shared inventory.render-artifact.test.ts: the earlier shape goes throughrenderStoredPayloadas supported, shows its value and labels each contributor by run ID.Done-when from #249
The hosted demo's report "FP-510 methanol setpoint optimization: process review", edition 1, shows the three KPI items once this is deployed to alpha. The three stored payloads have the earlier shape, with values 1.717, 2.859 and 0.215 g/L. I will check the page as an anonymous visitor after the deploy.
Fixes #249