Commit 85f2b46
fix: hash hostname in fingerprint, use relative validation paths, remove dead code
Three independent improvements:
1. Hash hostname before storing in envFingerprint (envFingerprint.js)
os.hostname() was stored verbatim in every Capsule and EvolutionEvent,
which are published to the public Hub. sanitize.js does not redact
hostnames (no matching pattern), so strings like 'john-macbook-pro.local'
leaked into the public feed. Replace with a 12-char SHA-256 prefix so
the value still uniquely identifies the environment class without
revealing the machine name.
2. Remove absolute paths from buildValidationCmd (assetStore.js)
The previous implementation resolved modules via path.resolve(__dirname)
at call time, embedding the current machine's absolute path (e.g.
/Users/xxx/codespace/evolver/src/evolve) into Gene validation commands
stored in genes.json. Two consequences:
- sanitize.js redacts /Users/... in published capsules, corrupting the
stored validation command for any consumer.
- Moving the project directory breaks all previously stored Gene
validation commands.
runValidations() already executes with cwd=repoRoot, so switching to
require('./src/evolve') style relative paths is correct and portable.
3. Remove appendCapsule dead code (assetStore.js, solidify.js)
appendCapsule was exported and imported by solidify.js but never called
(solidify uses upsertCapsule exclusively). It also lacked deduplication,
so any accidental call would grow capsules.json unboundedly. Removed the
function, its export, and the unused import in solidify.js.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>1 parent 203e5b8 commit 85f2b46
3 files changed
+7
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
| |||
216 | 213 | | |
217 | 214 | | |
218 | 215 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 216 | | |
228 | 217 | | |
229 | 218 | | |
| |||
263 | 252 | | |
264 | 253 | | |
265 | 254 | | |
266 | | - | |
| 255 | + | |
267 | 256 | | |
268 | 257 | | |
269 | 258 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments