asset-health flags every Gene with generation_meta as schema_invalid (missing strip-before-validate in assetStoreHealth)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, json, nodejs
- Domain
- devtools
Research direction
Start in evolver-core/dist/assetstore/assetStoreHealth.js around line 158, where schemaValid calls validateWire(record) without stripping hints, and compare with intakeGene, which validates stripGeneHints(gene) in wire/geneHints.js. Reproduce by running asset-health against a store whose genes.jsonl contains generation_meta. Done when Genes carrying generation_meta are no longer counted as schemaInvalid and asset-repair no longer proposes removing that field.
Written by the indexing model from the issue text.
Description
Summary
evolver asset-health reports schemaInvalidRows for every Gene that carries generation_meta (a field the intake path is explicitly designed to strip before validation). On a store of 33 Genes, the health report returns rows=33, validRows=0, schemaInvalidRows=33, permanently pinning asset-health to degraded. The only CLI-offered remedy, asset-repair --apply, deletes generation_meta and recomputes asset_id, i.e. it destroys provenance and changes the published asset identity in order to turn a counter green.
Environment
@evomap/evolver2.0.48 (npmlatest)- bundled
@evomap/evolver-core2.0.48,@evomap/gep-sdk1.14.0 - Node 22, Linux x64
Minimal reproduction (public API only)
const wire = await import('<evolver>/node_modules/@evomap/evolver-core/dist/wire/index.js');
const rec = JSON.parse(fs.readFileSync('<store>/assets/genes.jsonl','utf8').split('\n')[0]);
const gs = JSON.parse(fs.readFileSync('<evolver>/node_modules/@evomap/gep-sdk/schemas/gene.schema.json','utf8'));
wire.validateWire(rec).ok; // false
wire.validateWire(wire.stripGeneHints(rec)).ok; // true
Object.keys(rec).filter(k => !(k in gs.properties)); // [ 'generation_meta' ]
gs.additionalProperties; // false
Output on a real record:
id= gene_distilled_xxxxxxxx has generation_meta= true
validateWire(raw).ok = false ["Gene: 多余字段(additionalProperties:false 会 reject): generation_meta"]
validateWire(stripGeneHints(raw)).ok = true
additionalProperties = false | keys not in schema = [ 'generation_meta' ]
CLI side:
$ evolver asset-health --json | jq '.totals'
{"files":4,...,"rows":80,"validRows":46,"schemaInvalidRows":33,...}
# files[0]: kind=Gene file=genes.jsonl rows=33 validRows=0 schemaInvalidRows=33
$ evolver asset-repair --asset gene_distilled_xxxxxxxx --json # dry run, no --apply
{"status":"ok","changes":[
{"path":"generation_meta","action":"removed","note":"not declared by the GEP schema"},
{"path":"asset_id","action":"replaced","note":"recomputed the content id over the repaired record"}]}
Root cause
GENE_HINT_FIELDS = ['generation_meta','model_name'] is defined in wire/geneHints.js precisely so that receiver-side code can strip transport-only hints before schema validation, and intakeGene() does exactly that (validateWire(stripGeneHints(gene))). The asset-store health check bypasses the strip step:
// evolver-core/dist/assetstore/assetStoreHealth.js:158
const schemaValid = kind === 'AntiGene' || validateWire(record).ok;
Because [email protected] gene.schema.json sets additionalProperties:false and does not declare generation_meta, every stored Gene containing that hint is reported as schema-invalid — including Genes that were accepted by the intake path seconds earlier.
Impact
asset-healthcan never reportokfor any store that holds Genes created by the current intake path (i.e. practically all of them), so the health signal is unusable as a regression gate.- The documented remedy (
asset-repair --apply) mutates data to satisfy a checker: it dropsgeneration_meta(provenance) and recomputesasset_id, which is the identity used for hub-side verification/publishing. Following the tool's advice can therefore break published asset bindings. - Existing stores created before the health check was updated show the defect as pre-existing rather than a regression (genes.jsonl mtime predates the 2.0.48 upgrade), which makes it easy to misread as data corruption.
Suggested fix
- In
assetStoreHealth, validate the same shape the intake path validates:validateWire(stripGeneHints(record))forkind === 'Gene'(mirroringintakeGene), or - declare
generation_meta(andmodel_name) ingene.schema.jsonso the wire schema and the accepted-record schema agree. - Additionally,
asset-repairshould not propose removinggeneration_metafor records that the intake path accepts, and any repair that recomputesasset_idshould require an explicit flag / warn that hub-side verification will see a new asset id.
I hit this on a self-hosted node (33 Genes, all created through the normal intake path) and deliberately did not run asset-repair --apply for the reasons above. Happy to test a patch.
- Dominant language
- JavaScript
- Stars
- 9.1k
- Forks
- 848
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EvoMap/evolver
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Windows] fdatasyncSync on read-only fd throws EPERM, blocks node credential snapshot (canonicalIdentityLock.js)Possibly taken @scui73414-bot claimed this 64 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Similar issues
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Possibly taken @goranai claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
NL-BioImaging/OMERO.biomero#92 ·
Maintainers usually reply within 1 day
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LinkNacional/woo-rede#367 ·
-
Docs: 1 broken linkOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug Next.js
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-wizard#1397 · 1 comment ·
Maintainers usually reply within 1 day