Repository navigation
Conversation
…ings of a manifest
This comment has been minimized.
This comment has been minimized.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found.
|
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Closes #131
What
wire.Manifestholds oneplugin.jsonas data. It readsversion,license,did,requires,tested,engines,uninstall,hooks,defines,jobsandsettings, and keeps every other key raw inExtra.wire.Readreads one plugin from its own file system.wire.Loadreads every plugin under the roots with the checkswire.Runapplies.wire.Configgains an optionalManifestIndexPath, a JSON list of every manifest in wiring order that reads back into[]wire.Manifest.wire.Runrefuses a manifest whose new keys have the wrong shape and names the entry, such asjobs[0]: every is required.Why
A server binary ships without the plugin folders, so it cannot read a
plugin.jsonwhen it boots. Today only the generator reads a manifest, and only four of its keys. A downstream application needs a plugin's version, requirements, jobs and settings at runtime, and its generator needs them to check a plugin before it wires it in.wirechecks the shape of these keys and leaves their meaning to the application. An application checks keys of its own by callingwire.Loadbeforewire.Run.Testing
v0.8.0with this branch over 126,401 generated scenarios gave 100,067 of 100,067 byte-identical results for manifests with only today's keys.go test -race -shuffle=onpasses with 96 tests inwire, 371 with subtests. Coverage is 99.7%, and the one missed statement is old code inpackagejson.go.manifest.go. The 9 others that lived or were not covered are in old lines ofwire.gothat this change does not touch.wire.Runnow returns an error for it, and a test pins that. Fuzzing the reader, the index writer and the key matching found no crash.wire.gostays at 8.74, the same as before this change.