Set the decision and its input
The synthetic package contains logo.png but references Logo.png. Under its declared case-sensitive target lookup, that reference is missing. A case-folded lookup reports a misleading success. This resolves references without renaming or overwriting archive destinations.
| Case | Input JSON |
|---|---|
| Base test | {"caseSensitive":true,"reference":"Logo.png","entries":{"logo.png":"synthetic-bytes"}} |
Run the supplied comparison
The executable virtual entry map retains original labels. It performs no workstation scan and makes no universal filesystem case claim.
| Path | Output JSON |
|---|---|
| Faulty path | {"found":true,"matched":"logo.png"} |
| Required path | {"found":false,"matched":null} |
import assert from 'node:assert/strict';
const run=function run(i,corrected=true){
if(typeof i.caseSensitive!=='boolean')return {held:true};
const names=Object.keys(i.entries);const matched=names.find(name=>corrected&&i.caseSensitive?name===i.reference:name.toLowerCase()===i.reference.toLowerCase())??null;
return {found:matched!==null,matched};
};
const cases=[{"input":{"caseSensitive":true,"reference":"Logo.png","entries":{"logo.png":"synthetic-bytes"}},"corrected":false,"expected":{"found":true,"matched":"logo.png"}},{"input":{"caseSensitive":true,"reference":"Logo.png","entries":{"logo.png":"synthetic-bytes"}},"corrected":true,"expected":{"found":false,"matched":null}},{"input":{"caseSensitive":true,"reference":"logo.png","entries":{"logo.png":"synthetic-bytes"}},"corrected":true,"expected":{"found":true,"matched":"logo.png"}},{"input":{"caseSensitive":null,"reference":"Logo.png","entries":{"logo.png":"synthetic-bytes"}},"corrected":true,"expected":{"held":true}}];
for(const test of cases){const actual=await run(test.input,test.corrected);assert.deepEqual(actual,test.expected);console.log(actual);}
Choose from the boundary evidence
Exact lowercase spelling succeeds. Unknown target lookup behaviour is held before claiming compatibility.
- Read target lookup behaviour
- Resolve each package reference
- Record missing exact names
Do not infer a host’s behaviour from this virtual map.
| Condition | Input JSON | Expected output JSON |
|---|---|---|
| matching exact case | {"caseSensitive":true,"reference":"logo.png","entries":{"logo.png":"synthetic-bytes"}} | {"found":true,"matched":"logo.png"} |
| target lookup rule unknown | {"caseSensitive":null,"reference":"Logo.png","entries":{"logo.png":"synthetic-bytes"}} | {"held":true} |
Can the base package pass from its case-folded match?
Show the worked answer
No. The stated target requires exact case and Logo.png is absent. Correct the reference or supply that exact entry.