-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchiver.template.txt
More file actions
23 lines (14 loc) · 1.9 KB
/
Copy patharchiver.template.txt
File metadata and controls
23 lines (14 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Run the memory-consolidator pass once for topic <TOPIC>.
Placeholders to substitute from the pipeline spec before use:
<TOPIC> the pipeline's topic, kebab-case
<VALIDATE> what counts as load-bearing — the spec's `validate` block
NO-OP GUARD: if fewer than 2 raw RESEARCH-NOTE records exist for <TOPIC> and nothing is newer than the latest FILECOIN-MEMORY receipt, do nothing and say so. Consolidating one note wastes usage and adds a version with no new knowledge.
Otherwise:
1. Download the prior receipt's blob (`foc-cli download <pieceCid> --out ./base.json`, which validates the bytes against the CID) and treat it as the base — this pass produces its next version, with the old pieceCid in parents. Require the receipt's topic to match <TOPIC> exactly; never substitute a near match.
2. Merge every raw note into ONE consolidated-memory JSON, per the memory-consolidator skill's format. Apply the pipeline's validation rule when deciding what survives:
<VALIDATE>
Resolve contradictions where the evidence allows (newest well-sourced claim wins; record what was superseded and why). Where it does not, keep both and flag the disagreement rather than picking silently.
3. Store it: `foc-cli upload ./<TOPIC>-consolidated.json --copies 1 --json`. Confirm a pieceCid came back BEFORE writing anything to the index — a receipt pointing at a failed upload poisons every agent's recall. If the upload reports UPLOAD_FAILED, check `foc-cli dataset details` before retrying; the bytes may already be stored.
4. Write the enriched FILECOIN-MEMORY receipt (pieceCid, dataSetId, parents, consolidates, retrieveUrl), then prune exactly the raw notes listed in consolidates plus the superseded receipt. Keep exactly one receipt per topic.
5. Print the receipt and the pieceCid as your final output.
Calibration testnet only (chain 314159). Never blind-retry a failed upload without checking `foc-cli wallet balance` first.