Files
Marius CiepluchandClaude Fable 5.1 8ab4207618 feat(pair-corpus-honesty): add vibe-py, vfc-js and agent-vfc slices with mechanism vocabulary
Tasks 1.1, 5.1, 5.2, 5.4 and the data half of 5.3.

- mechanisms.toml: closed vocabulary v1 (20 ids) every expected row cites.
- vibe-py: 35 Real-Vuln-Benchmark pairs (Apache-2.0), human provenance only
  because the LLM-generated repositories carry no license (escalated).
- vfc-js: 17 Node fix-commit pairs harvested upstream (MIT/Apache-2.0),
  SecBench.js itself is not vendored (no license); sinks derived on 13/17.
- agent-vfc: 29 agent-trailer fixes as catalog-candidates.toml plus
  REVIEW.md; the loaded catalog stays empty until a human reviews them.
- datasets.toml and README document every slice and its review status.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
2026-09-05 10:45:42 +02:00

49 lines
1.5 KiB
JavaScript

// Provenance: trackly-app/trackly-cli (fixed).
// repo: trackly-app/trackly-cli
// commit: 1c1aed89b07edb04051830c8f086e02b65e961c6
// parent: 8d240ad8d7fc114c8f941ad956a2fdf32391ff60
// commit_url: https://github.com/trackly-app/trackly-cli/commit/1c1aed89b07edb04051830c8f086e02b65e961c6
// cve:
// license: MIT
// function: inspectExistingAncestor
// relpath: lib/path-diagnostics.js
// provenance: agent
// mechanism: path_join_user_input
async function inspectExistingAncestor(exactPath, stat = fs.stat) {
let candidate = exactPath;
while (true) {
try {
const stats = await stat(candidate);
return {
ancestor: candidate,
exactPathExists: candidate === exactPath,
exactPathType: candidate === exactPath ? (stats.isDirectory() ? 'directory' : 'file') : null,
writableDirectory: stats.isDirectory() ? candidate : path.dirname(candidate),
inspectionErrorCode: null,
};
} catch (error) {
if (error.code !== 'ENOENT') {
return {
ancestor: candidate,
exactPathExists: null,
exactPathType: null,
writableDirectory: null,
inspectionErrorCode: error.code || 'path_inspection_failed',
};
}
const parent = path.dirname(candidate);
if (parent === candidate) {
return {
ancestor: parent,
exactPathExists: false,
exactPathType: null,
writableDirectory: parent,
inspectionErrorCode: null,
};
}
candidate = parent;
}
}
}