chore: polish for FOL contract delivery (CHANGELOG, CLI guardrails, metadata)
- Update CHANGELOG.md for 1.1.0 (date, refactoring, repository fixes) - Add overwrite guardrails to imhotep-cli init — skips existing files - Add bugs/homepage/keywords metadata to 5 public packages - Mark imhotep-bench and imhotep-fixtures as private packages - Add selector field to SourceReference interface (core types) - Remove 7 casts from check-all.ts (folAst.position, cardinality results) - Generate package-lock.json for reproducible installs
This commit is contained in:
@@ -121,6 +121,7 @@ export function makeCheckAll(deps: CheckAllDeps): ImhotepUi['checkAll'] {
|
||||
const validationClauseResults: ClauseResult[] = []
|
||||
|
||||
for (let i = 0; i < assertions.length; i++) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const assertion = assertions[i] as any
|
||||
// Cardinality assertions are evaluated outside the FOL engine.
|
||||
if (assertion && ['exactlyOne', 'atLeastN', 'atMostN'].includes(assertion.kind)) {
|
||||
@@ -240,8 +241,8 @@ export function makeCheckAll(deps: CheckAllDeps): ImhotepUi['checkAll'] {
|
||||
for (const folAst of folFormulas) {
|
||||
const solverFormula = compileDenseFOLToFormula(folAst)
|
||||
const selectors = getSelectorsFromFormula(solverFormula)
|
||||
const sourceRef: SourceReference = (folAst as any).position?.start
|
||||
? { specLine: (folAst as any).position.start.line, specColumn: (folAst as any).position.start.column }
|
||||
const sourceRef: SourceReference = folAst.position?.start
|
||||
? { specLine: folAst.position.start.line, specColumn: folAst.position.start.column }
|
||||
: {}
|
||||
checks.push({
|
||||
clauseId: `clause_${specBase++}`,
|
||||
@@ -420,11 +421,10 @@ export function makeCheckAll(deps: CheckAllDeps): ImhotepUi['checkAll'] {
|
||||
metrics: {
|
||||
observedCount: 0,
|
||||
expectedCount: cardResult.expectedCount,
|
||||
selector: cardResult.selector,
|
||||
} as any,
|
||||
},
|
||||
witness: { subjectId: 0, frameId: 0 },
|
||||
diagnostics: cardResult.diagnostics.map((d) => d.code),
|
||||
sourceRef: { selector: cardResult.selector } as any,
|
||||
sourceRef: { selector: cardResult.selector },
|
||||
clauseLabel: cardResult.label,
|
||||
})
|
||||
cardDiagnostics.push(...cardResult.diagnostics)
|
||||
@@ -481,11 +481,10 @@ export function makeCheckAll(deps: CheckAllDeps): ImhotepUi['checkAll'] {
|
||||
metrics: {
|
||||
observedCount: selectorToIds.get(cardResult.selector)?.length ?? 0,
|
||||
expectedCount: cardResult.expectedCount,
|
||||
selector: cardResult.selector,
|
||||
} as any,
|
||||
},
|
||||
witness: { subjectId: 0, frameId: 0 },
|
||||
diagnostics: cardResult.diagnostics.map((d) => d.code),
|
||||
sourceRef: { selector: cardResult.selector } as any,
|
||||
sourceRef: { selector: cardResult.selector },
|
||||
clauseLabel: cardResult.label,
|
||||
})
|
||||
allDiagnostics.push(...cardResult.diagnostics)
|
||||
|
||||
Reference in New Issue
Block a user