audit-tools 0.55.4 → 0.55.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/cli/auditReviewBindings.d.ts +4 -4
- package/dist/audit/cli/auditStep.d.ts +15 -1
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +24 -11
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +3 -1
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanup.d.ts.map +1 -1
- package/dist/audit/cli/cleanup.js +26 -2
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +2 -0
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +29 -8
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +37 -3
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +185 -16
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/envelope.d.ts +1 -1
- package/dist/audit/cli/envelope.d.ts.map +1 -1
- package/dist/audit/cli/envelope.js +4 -1
- package/dist/audit/cli/envelope.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +30 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +76 -8
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts +9 -6
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +22 -7
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +3 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +104 -66
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +49 -14
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +169 -68
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +10 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +4 -3
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +2 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +5 -50
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/validateResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateResultsCommand.js +3 -1
- package/dist/audit/cli/validateResultsCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +14 -14
- package/dist/audit/extractors/fsIntake.d.ts +13 -0
- package/dist/audit/extractors/fsIntake.d.ts.map +1 -1
- package/dist/audit/extractors/fsIntake.js +11 -1
- package/dist/audit/extractors/fsIntake.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +35 -9
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +84 -67
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/rollover.d.ts +18 -0
- package/dist/audit/io/rollover.d.ts.map +1 -0
- package/dist/audit/io/rollover.js +152 -0
- package/dist/audit/io/rollover.js.map +1 -0
- package/dist/audit/io/runSnapshot.d.ts +149 -0
- package/dist/audit/io/runSnapshot.d.ts.map +1 -0
- package/dist/audit/io/runSnapshot.js +710 -0
- package/dist/audit/io/runSnapshot.js.map +1 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts +11 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +9 -0
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +22 -2
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +18 -3
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts +11 -1
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +13 -0
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +6 -0
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +35 -11
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +9 -0
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +69 -31
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +1 -0
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +2 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +13 -4
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -1
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts +8 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.js +13 -4
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +4 -1
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +40 -6
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +4 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.d.ts +20 -0
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.js +80 -18
- package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
- package/dist/audit/systemic/reviewFileMap.d.ts +72 -21
- package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -1
- package/dist/audit/systemic/reviewFileMap.js +96 -45
- package/dist/audit/systemic/reviewFileMap.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts +7 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +39 -8
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/types.d.ts +12 -12
- package/dist/audit/validation/auditResults.d.ts +1 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +1 -0
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/remediate/findingFilter.js +1 -1
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +1 -0
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +29 -5
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +1 -1
- package/dist/remediate/phases/triage.d.ts +2 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +46 -25
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/phases/triageConformance.d.ts +14 -0
- package/dist/remediate/phases/triageConformance.d.ts.map +1 -0
- package/dist/remediate/phases/triageConformance.js +189 -0
- package/dist/remediate/phases/triageConformance.js.map +1 -0
- package/dist/remediate/state/decisionConsumption.d.ts +110 -0
- package/dist/remediate/state/decisionConsumption.d.ts.map +1 -0
- package/dist/remediate/state/decisionConsumption.js +122 -0
- package/dist/remediate/state/decisionConsumption.js.map +1 -0
- package/dist/remediate/state/store.d.ts +4 -0
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +16 -0
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +0 -6
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +3 -32
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +9 -0
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +32 -14
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.js +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +6 -2
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.js +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +1 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +8 -52
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +7 -0
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +69 -75
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +6 -9
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/recoverIngest.js +1 -1
- package/dist/remediate/steps/recoverIngest.js.map +1 -1
- package/dist/shared/analyzers/provenance.d.ts +1 -1
- package/dist/shared/analyzers/provenance.js +1 -1
- package/dist/shared/contentKey.d.ts +3 -2
- package/dist/shared/contentKey.d.ts.map +1 -1
- package/dist/shared/contentKey.js +3 -2
- package/dist/shared/contentKey.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +200 -13
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +34 -6
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +1 -1
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +1 -1
- package/dist/shared/engine/obligationEngine.js +1 -1
- package/dist/shared/findings/dedupe.js +1 -1
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/git.d.ts +30 -1
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +65 -6
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/clauseBoundaries.d.ts +1 -0
- package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -1
- package/dist/shared/intent/clauseBoundaries.js +1 -0
- package/dist/shared/intent/clauseBoundaries.js.map +1 -1
- package/dist/shared/intent/pathScope.d.ts +1 -0
- package/dist/shared/intent/pathScope.d.ts.map +1 -1
- package/dist/shared/intent/pathScope.js +1 -0
- package/dist/shared/intent/pathScope.js.map +1 -1
- package/dist/shared/io/nodeWorktreeGuard.d.ts +1 -1
- package/dist/shared/io/nodeWorktreeGuard.js +1 -1
- package/dist/shared/io/pathIdentity.d.ts.map +1 -1
- package/dist/shared/io/pathIdentity.js +1 -0
- package/dist/shared/io/pathIdentity.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +1 -0
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +1 -0
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +11 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/prompts.d.ts +2 -0
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +8 -2
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/submission/ingestReport.d.ts.map +1 -1
- package/dist/shared/submission/ingestReport.js +19 -1
- package/dist/shared/submission/ingestReport.js.map +1 -1
- package/dist/shared/submission/submissionLedger.js +2 -2
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.js +1 -1
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/exec.js +2 -2
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +9 -0
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +7 -0
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/closingActions.js +1 -1
- package/dist/shared/types/closingActions.js.map +1 -1
- package/dist/shared/types/finding.js +2 -2
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/stepContract.js +1 -1
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts +1 -0
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +1 -0
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/producerBoundary.d.ts +10 -0
- package/dist/shared/validation/producerBoundary.d.ts.map +1 -0
- package/dist/shared/validation/producerBoundary.js +26 -0
- package/dist/shared/validation/producerBoundary.js.map +1 -0
- package/docs/audit-pkg/contracts.md +6 -2
- package/docs/audit-pkg/operator-guide.md +13 -4
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewFileMap.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reviewFileMap.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,UAAU,EAAE;QACV,yEAAyE;QACzE,MAAM,EAAE,MAAM,CAAC;QACf,8CAA8C;QAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,8EAA8E;QAC9E,UAAU,EAAE,MAAM,CAAC;QACnB,gEAAgE;QAChE,aAAa,EAAE,OAAO,CAAC;KACxB,CAAC;IACF,2EAA2E;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,gFAAgF;QAChF,UAAU,EAAE,MAAM,CAAC;QACnB;;;WAGG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,oEAAoE;IACpE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,kBAAkB,GACxB,aAAa,CA+Df;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAiEhE;AAED,iGAAiG;AACjG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC,+FAA+F;IAC/F,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,+FAA+F;IAC/F,WAAW,EAAE,wBAAwB,CAAC;CACvC;AAKD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,oBAAoB,CAsC7E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// sites-pinned: tests/audit/systemic-challenge.test.ts, tests/audit/review-file-map-context.test.ts
|
|
1
2
|
/**
|
|
2
3
|
* The VERIFIED CALL-SITE MAP a design-review round receives as a read-only,
|
|
3
4
|
* provenanced input.
|
|
@@ -13,32 +14,42 @@
|
|
|
13
14
|
* So the map is derived ONCE, by the tool, from artifacts the round did not
|
|
14
15
|
* produce either (the repository manifest and the dependency graph the audit
|
|
15
16
|
* pipeline already extracted), and handed over labelled as prior verified recon.
|
|
16
|
-
* It is a lane ASSET, not a submission:
|
|
17
|
-
* (`renderReviewFileMap`)
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* It is a lane ASSET, not a submission: the complete render
|
|
18
|
+
* (`renderReviewFileMap`) reaches the round as a READ-ONLY context file the lane
|
|
19
|
+
* materializer writes and binds into the lane's review binding, so acceptance
|
|
20
|
+
* re-hashes it and refuses a submission made against an edited copy; the prompt
|
|
21
|
+
* carries only a summary and the file's path (`reviewFileMapContext`). The file
|
|
22
|
+
* is never on a path any lane's write scope covers, and no submission schema has
|
|
23
|
+
* a field for it — a round has no route by which to write back, because the
|
|
24
|
+
* only thing it hands over is its own findings. Updates
|
|
20
25
|
* go through a separate recon pass (the graph builder), which is the only thing
|
|
21
26
|
* that can change what the next round receives. Otherwise the map quietly
|
|
22
27
|
* absorbs one reviewer's assumption and reaches the next reviewer as fact.
|
|
23
28
|
*
|
|
29
|
+
* The map is SCOPED to what the reading round reviews — the files its own prompt
|
|
30
|
+
* names as under review, which only the consumer knows: every file in that scope
|
|
31
|
+
* gets an anchor carrying its COMPLETE caller and callee lists, and nothing outside
|
|
32
|
+
* it is anchored. There is no cap. An earlier version anchored the path-sorted
|
|
33
|
+
* FIRST 60 authored files and listed at most 25 call sites each — neither number
|
|
34
|
+
* measured — so on a repository with more connected files a round received recon
|
|
35
|
+
* for files that merely sort early and had to re-derive the map for the ones it
|
|
36
|
+
* was judging, the exact waste this artefact exists to remove. Whatever the map
|
|
37
|
+
* leaves out (in-scope files with no edge, files outside the scope) is STATED in
|
|
38
|
+
* the render: a silently thin map reads as a complete one.
|
|
39
|
+
*
|
|
24
40
|
* Deterministic and content-derived: every array is ordered by a stable key, so
|
|
25
|
-
* the file does not churn between emissions of an unchanged round.
|
|
26
|
-
* drops entries STATES the drop — a silently truncated map reads as a complete
|
|
27
|
-
* one, which is the failure mode this whole artefact exists to avoid.
|
|
41
|
+
* the file does not churn between emissions of an unchanged round.
|
|
28
42
|
*/
|
|
29
43
|
import { compareCodeUnits } from "audit-tools/shared";
|
|
30
|
-
/** How many call sites per anchor are listed before the drop is stated. */
|
|
31
|
-
const MAX_CALLERS_PER_ANCHOR = 25;
|
|
32
|
-
/** How many authored files are mapped before the drop is stated. */
|
|
33
|
-
const MAX_ANCHORS = 60;
|
|
34
44
|
/**
|
|
35
45
|
* Build the map from the dependency graph the audit already extracted. Edges are
|
|
36
46
|
* read in both directions per anchor — callers and callees — because the review
|
|
37
47
|
* questions this feeds ("what does this change ripple into") need both and a
|
|
38
|
-
* round that re-derives one direction has re-derived the whole thing.
|
|
48
|
+
* round that re-derives one direction has re-derived the whole thing. Anchors are
|
|
49
|
+
* exactly the files in `scope`; their callers and callees are whatever the graph
|
|
50
|
+
* records, in or out of scope.
|
|
39
51
|
*/
|
|
40
|
-
export function buildReviewFileMap(bundle,
|
|
41
|
-
const maxAnchors = options.maxAnchors ?? MAX_ANCHORS;
|
|
52
|
+
export function buildReviewFileMap(bundle, scope) {
|
|
42
53
|
const graphs = bundle.graph_bundle?.graphs;
|
|
43
54
|
const sources = [];
|
|
44
55
|
const outgoing = new Map();
|
|
@@ -67,28 +78,19 @@ export function buildReviewFileMap(bundle, options = {}) {
|
|
|
67
78
|
edgeCount += kindCount;
|
|
68
79
|
}
|
|
69
80
|
sources.sort(compareCodeUnits);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const authored = (bundle.repo_manifest?.files ?? [])
|
|
74
|
-
.map((file) => file.path)
|
|
75
|
-
.sort(compareCodeUnits);
|
|
81
|
+
const inScope = [...new Set(scope.files)].sort(compareCodeUnits);
|
|
82
|
+
const inScopeSet = new Set(inScope);
|
|
83
|
+
const outsideScope = (bundle.repo_manifest?.files ?? []).filter((file) => !inScopeSet.has(file.path)).length;
|
|
76
84
|
const anchors = [];
|
|
77
85
|
let filesWithoutEdges = 0;
|
|
78
|
-
for (const path of
|
|
86
|
+
for (const path of inScope) {
|
|
79
87
|
const callers = [...(incoming.get(path) ?? [])].sort(compareCodeUnits);
|
|
80
88
|
const callees = [...(outgoing.get(path) ?? [])].sort(compareCodeUnits);
|
|
81
89
|
if (callers.length === 0 && callees.length === 0) {
|
|
82
90
|
filesWithoutEdges += 1;
|
|
83
91
|
continue;
|
|
84
92
|
}
|
|
85
|
-
anchors.push({
|
|
86
|
-
path,
|
|
87
|
-
callers: callers.slice(0, MAX_CALLERS_PER_ANCHOR),
|
|
88
|
-
callers_omitted: Math.max(0, callers.length - MAX_CALLERS_PER_ANCHOR),
|
|
89
|
-
callees: callees.slice(0, MAX_CALLERS_PER_ANCHOR),
|
|
90
|
-
callees_omitted: Math.max(0, callees.length - MAX_CALLERS_PER_ANCHOR),
|
|
91
|
-
});
|
|
93
|
+
anchors.push({ path, callers, callees });
|
|
92
94
|
}
|
|
93
95
|
return {
|
|
94
96
|
provenance: {
|
|
@@ -97,8 +99,12 @@ export function buildReviewFileMap(bundle, options = {}) {
|
|
|
97
99
|
edge_count: edgeCount,
|
|
98
100
|
graph_present: graphs !== undefined,
|
|
99
101
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
scope: {
|
|
103
|
+
basis: scope.basis,
|
|
104
|
+
file_count: inScope.length,
|
|
105
|
+
outside_scope: outsideScope,
|
|
106
|
+
},
|
|
107
|
+
anchors,
|
|
102
108
|
files_without_edges: filesWithoutEdges,
|
|
103
109
|
};
|
|
104
110
|
}
|
|
@@ -130,7 +136,16 @@ export function renderReviewFileMap(map) {
|
|
|
130
136
|
? " — the dependency graph carried no edges."
|
|
131
137
|
: " — no dependency graph was available."),
|
|
132
138
|
"",
|
|
139
|
+
`Scope: ${map.scope.basis} — ${map.scope.file_count} file(s) under review. Every one the graph ` +
|
|
140
|
+
"connects is listed below with its COMPLETE caller and callee lists; nothing is capped.",
|
|
141
|
+
"",
|
|
133
142
|
];
|
|
143
|
+
if (map.scope.outside_scope > 0) {
|
|
144
|
+
lines.push(`${map.scope.outside_scope} other authored file(s) lie outside this scope and are not ` +
|
|
145
|
+
"anchored; they still appear as callers or callees wherever an edge reaches them. An " +
|
|
146
|
+
"unanchored file is outside this map, not unconnected — derive its call sites yourself " +
|
|
147
|
+
"if your review follows the code there.", "");
|
|
148
|
+
}
|
|
134
149
|
const noEdgeLine = (count) => `${count} authored file(s) carry no graph edge and are NOT listed — their absence is a gap ` +
|
|
135
150
|
"in this extraction, not a finding that nothing depends on them.";
|
|
136
151
|
if (map.anchors.length === 0) {
|
|
@@ -144,26 +159,62 @@ export function renderReviewFileMap(map) {
|
|
|
144
159
|
}
|
|
145
160
|
for (const anchor of map.anchors) {
|
|
146
161
|
lines.push(`- **${anchor.path}**`);
|
|
147
|
-
lines.push(` - referenced by: ${anchor.callers.join(", ") || "(none recorded)"}`
|
|
148
|
-
|
|
149
|
-
? ` — and ${anchor.callers_omitted} more not listed`
|
|
150
|
-
: ""));
|
|
151
|
-
lines.push(` - references: ${anchor.callees.join(", ") || "(none recorded)"}` +
|
|
152
|
-
(anchor.callees_omitted > 0
|
|
153
|
-
? ` — and ${anchor.callees_omitted} more not listed`
|
|
154
|
-
: ""));
|
|
155
|
-
}
|
|
156
|
-
if (map.anchors_omitted > 0) {
|
|
157
|
-
lines.push("", `⚠ ${map.anchors_omitted} further file(s) with call sites are NOT listed above (this map is ` +
|
|
158
|
-
"capped). Their absence is a cap, not a finding — do not report an unlisted file as having " +
|
|
159
|
-
"no connections.");
|
|
162
|
+
lines.push(` - referenced by: ${anchor.callers.join(", ") || "(none recorded)"}`);
|
|
163
|
+
lines.push(` - references: ${anchor.callees.join(", ") || "(none recorded)"}`);
|
|
160
164
|
}
|
|
161
165
|
if (map.files_without_edges > 0) {
|
|
162
|
-
//
|
|
163
|
-
// files the graph has no edge for at all. Both are drops, so both are stated.
|
|
166
|
+
// In-scope files the graph has no edge for at all: a drop, so it is stated.
|
|
164
167
|
lines.push("", `⚠ ${noEdgeLine(map.files_without_edges)}`);
|
|
165
168
|
}
|
|
166
169
|
lines.push("");
|
|
167
170
|
return lines;
|
|
168
171
|
}
|
|
172
|
+
/** The context file's name. Its directory is content-addressed by the lane materializer. */
|
|
173
|
+
const REVIEW_FILE_MAP_FILENAME = "review-call-site-map.md";
|
|
174
|
+
/**
|
|
175
|
+
* Split one map into the prompt summary and the read-only context file, so the
|
|
176
|
+
* two cannot come from different builds. The complete map is uncapped and can be
|
|
177
|
+
* large, so the prompt does not inline it: it states the provenance, the
|
|
178
|
+
* read-only rule and every count the map's own render states (scope, anchors,
|
|
179
|
+
* edge-less files, files outside the scope), and points at the file the lane
|
|
180
|
+
* materializer lists under its "Read-only context files" section.
|
|
181
|
+
*/
|
|
182
|
+
export function reviewFileMapContext(map) {
|
|
183
|
+
const noRecon = "so the map is NO RECON — an absent edge is not evidence that no caller exists";
|
|
184
|
+
const edges = map.provenance.sources.length > 0
|
|
185
|
+
? `from ${map.provenance.sources.join(", ")}`
|
|
186
|
+
: map.provenance.graph_present
|
|
187
|
+
? `the dependency graph carried no edges, ${noRecon}`
|
|
188
|
+
: `no dependency graph was available, ${noRecon}`;
|
|
189
|
+
const summaryLines = [
|
|
190
|
+
"### Verified call-site map (provenance: machine-derived prior recon — you did NOT author this)",
|
|
191
|
+
"",
|
|
192
|
+
"The audit tool derived a call-site map from the dependency graph and the repository manifest " +
|
|
193
|
+
`extracted earlier in this run and wrote it to the read-only file \`${REVIEW_FILE_MAP_FILENAME}\`, ` +
|
|
194
|
+
'whose full path is listed under "Read-only context files" at the end of this prompt. Read it ' +
|
|
195
|
+
"BEFORE re-deriving any call site: it is a factual input handed to you so this round spends its " +
|
|
196
|
+
"budget on judgment, and you are expected to TRUST it as a starting point, not to reproduce it.",
|
|
197
|
+
"",
|
|
198
|
+
"**You cannot write back to it.** The file is read-only and bound into this review, so a " +
|
|
199
|
+
"submission made against an edited copy is refused, and a correction reaches the next round " +
|
|
200
|
+
"only through a fresh extraction pass. If it disagrees with what you find in the source, say " +
|
|
201
|
+
"so explicitly in your finding — name the file and the symbol that contradicts the map. Your " +
|
|
202
|
+
"VERDICT remains entirely your own; only the recon is shared.",
|
|
203
|
+
"",
|
|
204
|
+
`Scope: ${map.scope.basis} — ${map.scope.file_count} file(s) under review; ` +
|
|
205
|
+
`${map.anchors.length} anchored with their complete caller and callee lists; ` +
|
|
206
|
+
`${map.files_without_edges} carry no graph edge; ` +
|
|
207
|
+
`${map.scope.outside_scope} other authored file(s) lie outside this scope and are not anchored.`,
|
|
208
|
+
`Edges consulted: ${map.provenance.edge_count} — ${edges}.`,
|
|
209
|
+
"",
|
|
210
|
+
];
|
|
211
|
+
return {
|
|
212
|
+
summaryLines,
|
|
213
|
+
contextFile: {
|
|
214
|
+
filename: REVIEW_FILE_MAP_FILENAME,
|
|
215
|
+
label: "Verified call-site map (tool-generated prior recon)",
|
|
216
|
+
text: renderReviewFileMap(map).join("\n"),
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
}
|
|
169
220
|
//# sourceMappingURL=reviewFileMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewFileMap.js","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reviewFileMap.js","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA0DtD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAsB,EACtB,KAAyB;IAEzB,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC;IAC3C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MA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AG,CAAC;QAC/B,CAAC,CAAC,QAAQ,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC7C,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa;YAC5B,CAAC,CAAC,0CAA0C,OAAO,EAAE;YACrD,CAAC,CAAC,sCAAsC,OAAO,EAAE,CAAC;IACxD,MAAM,YAAY,GAAG;QACnB,gGAAgG;QAChG,EAAE;QACF,+FAA+F;YAC7F,sEAAsE,wBAAwB,MAAM;YACpG,+FAA+F;YAC/F,iGAAiG;YACjG,gGAAgG;QAClG,EAAE;QACF,0FAA0F;YACxF,6FAA6F;YAC7F,8FAA8F;YAC9F,8FAA8F;YAC9F,8DAA8D;QAChE,EAAE;QACF,UAAU,GAAG,CAAC,KAAK,CAAC,KAAK,MAAM,GAAG,CAAC,KAAK,CAAC,UAAU,yBAAyB;YAC1E,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,yDAAyD;YAC9E,GAAG,GAAG,CAAC,mBAAmB,wBAAwB;YAClD,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,sEAAsE;QAClG,oBAAoB,GAAG,CAAC,UAAU,CAAC,UAAU,MAAM,KAAK,GAAG;QAC3D,EAAE;KACH,CAAC;IACF,OAAO;QACL,YAAY;QACZ,WAAW,EAAE;YACX,QAAQ,EAAE,wBAAwB;YAClC,KAAK,EAAE,qDAAqD;YAC5D,IAAI,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SAC1C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
2
|
import type { AggregateMetricsDigest } from "./aggregateMetricsDigest.js";
|
|
3
|
+
import { type ReviewFileMapContext } from "./reviewFileMap.js";
|
|
4
|
+
/**
|
|
5
|
+
* The call-site map a systemic challenge round receives: the summary its prompt
|
|
6
|
+
* carries and the read-only context file its emission site passes to the lane
|
|
7
|
+
* materializer. The same build `renderSecondOrderAdversaryPrompt` summarizes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function adversaryFileMapContext(bundle: ArtifactBundle): ReviewFileMapContext;
|
|
3
10
|
/**
|
|
4
11
|
* Render one systemic challenge round. `evidencePaths` are also granted in the
|
|
5
12
|
* host step's read set; the prompt names them so the adversary can inspect the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondOrderAdversaryPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondOrderAdversaryPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAK1E,OAAO,EAGL,KAAK,oBAAoB,EAG1B,MAAM,oBAAoB,CAAC;AAgD5B;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,oBAAoB,CAEpF;AAqKD;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,sBAAsB,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GAAG,MAAM,CA4JT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// sites-pinned: tests/audit/systemic-evidence-projection.test.ts, tests/shared/prompt-renders-its-contract.test.ts
|
|
1
|
+
// sites-pinned: tests/audit/systemic-evidence-projection.test.ts, tests/shared/prompt-renders-its-contract.test.ts, tests/shared/design-check-provenanced-input.test.ts, tests/audit/review-file-map-context.test.ts
|
|
2
2
|
// Phase E — SECOND-ORDER ADVERSARY prompt (host_delegation).
|
|
3
3
|
//
|
|
4
4
|
// The adversary is a SEPARATE agent and receives the evidence the earlier
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// direct repository/source verification.
|
|
8
8
|
import { FindingConfidenceSchema, FindingSeveritySchema, LENSES, } from "audit-tools/shared";
|
|
9
9
|
import { summarizeCoveredThemes, } from "./coveredThemes.js";
|
|
10
|
-
import { buildReviewFileMap,
|
|
10
|
+
import { buildReviewFileMap, reviewFileMapContext, } from "./reviewFileMap.js";
|
|
11
11
|
function priorFindings(bundle) {
|
|
12
12
|
const candidates = [
|
|
13
13
|
...(bundle.design_assessment?.contract_findings ?? []),
|
|
@@ -24,6 +24,35 @@ function priorFindings(bundle) {
|
|
|
24
24
|
return true;
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* What this round is pointed at: the files the banked findings implicate and the
|
|
29
|
+
* files the charter register's goal nodes cover — the two places this prompt
|
|
30
|
+
* names repository files as under challenge. The call-site map anchors exactly
|
|
31
|
+
* these, completely, so the round does not re-derive their call sites.
|
|
32
|
+
*/
|
|
33
|
+
function adversaryReviewScope(bundle, bankedFindings) {
|
|
34
|
+
const findingFiles = bankedFindings.flatMap((finding) => finding.affected_files.map((entry) => entry.path));
|
|
35
|
+
const register = bundle.charter_register;
|
|
36
|
+
const charterFiles = register && register.status !== "omitted"
|
|
37
|
+
? register.lanes.flatMap((lane) => lane.nodes.flatMap((node) => node.files ?? []))
|
|
38
|
+
: [];
|
|
39
|
+
return {
|
|
40
|
+
files: [...findingFiles, ...charterFiles],
|
|
41
|
+
basis: "the files the banked findings implicate and the files the charter register's goal " +
|
|
42
|
+
"nodes cover (both projected below)",
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function adversaryFileMap(bundle, bankedFindings) {
|
|
46
|
+
return buildReviewFileMap(bundle, adversaryReviewScope(bundle, bankedFindings));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The call-site map a systemic challenge round receives: the summary its prompt
|
|
50
|
+
* carries and the read-only context file its emission site passes to the lane
|
|
51
|
+
* materializer. The same build `renderSecondOrderAdversaryPrompt` summarizes.
|
|
52
|
+
*/
|
|
53
|
+
export function adversaryFileMapContext(bundle) {
|
|
54
|
+
return reviewFileMapContext(adversaryFileMap(bundle, priorFindings(bundle)));
|
|
55
|
+
}
|
|
27
56
|
function renderPriorFindings(findings) {
|
|
28
57
|
if (findings.length === 0)
|
|
29
58
|
return ["No prior findings were banked."];
|
|
@@ -162,9 +191,9 @@ function adversaryIdentityLines() {
|
|
|
162
191
|
* REFUSES a finding whose `affected_files` names nothing the run's repository
|
|
163
192
|
* manifest holds. A placeholder is therefore not merely unhelpful — copied
|
|
164
193
|
* verbatim it is a refused round. So the example takes its path from the
|
|
165
|
-
* call-site map this
|
|
194
|
+
* call-site map this round receives, falling back to the manifest the map
|
|
166
195
|
* itself derives from: a reader who copies the example cites a file the reader
|
|
167
|
-
* can also see named
|
|
196
|
+
* can also see named in the map file.
|
|
168
197
|
*/
|
|
169
198
|
function examplePath(bundle, fileMap) {
|
|
170
199
|
return (fileMap.anchors[0]?.path ??
|
|
@@ -182,7 +211,7 @@ export function renderSecondOrderAdversaryPrompt(opts) {
|
|
|
182
211
|
metricLines.push(`- Max fan-out (out-degree): ${opts.metrics.max_fan_out}`);
|
|
183
212
|
const bankedFindings = priorFindings(opts.bundle);
|
|
184
213
|
const evidencePaths = [...new Set(opts.evidencePaths)].sort();
|
|
185
|
-
const fileMap =
|
|
214
|
+
const fileMap = adversaryFileMap(opts.bundle, bankedFindings);
|
|
186
215
|
const exampleFilePath = examplePath(opts.bundle, fileMap);
|
|
187
216
|
return [
|
|
188
217
|
"# Design review — systemic improvement-seeking challenge (second-order adversary)",
|
|
@@ -208,7 +237,9 @@ export function renderSecondOrderAdversaryPrompt(opts) {
|
|
|
208
237
|
"",
|
|
209
238
|
"## Prior verified recon — read this BEFORE re-deriving anything",
|
|
210
239
|
"",
|
|
211
|
-
|
|
240
|
+
// The summary only: the complete map reaches the lane as a read-only context
|
|
241
|
+
// file its emission site binds (`adversaryFileMapContext`).
|
|
242
|
+
...reviewFileMapContext(fileMap).summaryLines,
|
|
212
243
|
"## Stated-purpose / goal / delta projection",
|
|
213
244
|
"",
|
|
214
245
|
"Treat a triangulated purpose as a lead. Preserve disagreement, and inspect the full artifact when the projection raises a question:",
|
|
@@ -236,7 +267,7 @@ export function renderSecondOrderAdversaryPrompt(opts) {
|
|
|
236
267
|
"",
|
|
237
268
|
"## Repository/source verification (required)",
|
|
238
269
|
"",
|
|
239
|
-
"Use the repository and the strongest structural tools available. The call-site map
|
|
270
|
+
"Use the repository and the strongest structural tools available. The call-site map file is " +
|
|
240
271
|
"your starting recon — verify the sites it names and the claims you build on them, rather " +
|
|
241
272
|
"than rebuilding it. For every proposed improvement, inspect exact source sites, trace " +
|
|
242
273
|
"relevant callers and callees in both directions, and verify the affected paths. Before any " +
|
|
@@ -264,7 +295,7 @@ export function renderSecondOrderAdversaryPrompt(opts) {
|
|
|
264
295
|
"## Grounding — every improvement names a real file (required)",
|
|
265
296
|
"",
|
|
266
297
|
"Each finding's `affected_files` must name at least one file THIS repository holds, written " +
|
|
267
|
-
"repo-relative and spelled as the call-site map
|
|
298
|
+
"repo-relative and spelled as the call-site map file spells it. A submission carrying an " +
|
|
268
299
|
"improvement that names no such file is REFUSED as a whole, and the refusal names the " +
|
|
269
300
|
"finding: correct the path and resubmit. An improvement pointing at nothing cannot be " +
|
|
270
301
|
"verified, dispatched, or remediated.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondOrderAdversaryPrompt.js","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"secondOrderAdversaryPrompt.js","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAAA,qNAAqN;AACrN,6DAA6D;AAC7D,EAAE;AACF,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,yCAAyC;AAEzC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,MAAM,GACP,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EACL,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GAIrB,MAAM,oBAAoB,CAAC;AAE5B,SAAS,aAAa,CAAC,MAAsB;IAC3C,MAAM,UAAU,GAAG;QACjB,GAAG,CAAC,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,IAAI,EAAE,CAAC;QACtD,GAAG,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,IAAI,EAAE,CAAC;QACxD,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;QAC5C,GAAG,CAAC,MAAM,CAAC,kBAAkB,EAAE,QAAQ,IAAI,EAAE,CAAC;KAC/C,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;QACnC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,IAAI,SAAS,OAAO,CAAC,QAAQ,SAAS,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7E,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAC3B,MAAsB,EACtB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types.d.ts
CHANGED
|
@@ -395,9 +395,9 @@ export declare const AuditTaskSchema: z.ZodObject<{
|
|
|
395
395
|
status?: "pending" | "complete" | undefined;
|
|
396
396
|
tags?: string[] | undefined;
|
|
397
397
|
token_estimate?: number | undefined;
|
|
398
|
+
inputs?: Record<string, string> | undefined;
|
|
398
399
|
completed_at?: string | undefined;
|
|
399
400
|
file_line_counts?: Record<string, number> | undefined;
|
|
400
|
-
inputs?: Record<string, string> | undefined;
|
|
401
401
|
line_ranges?: {
|
|
402
402
|
path: string;
|
|
403
403
|
end: number;
|
|
@@ -424,9 +424,9 @@ export declare const AuditTaskSchema: z.ZodObject<{
|
|
|
424
424
|
status?: "pending" | "complete" | undefined;
|
|
425
425
|
tags?: string[] | undefined;
|
|
426
426
|
token_estimate?: number | undefined;
|
|
427
|
+
inputs?: Record<string, string> | undefined;
|
|
427
428
|
completed_at?: string | undefined;
|
|
428
429
|
file_line_counts?: Record<string, number> | undefined;
|
|
429
|
-
inputs?: Record<string, string> | undefined;
|
|
430
430
|
line_ranges?: {
|
|
431
431
|
path: string;
|
|
432
432
|
end: number;
|
|
@@ -564,9 +564,9 @@ export declare const AuditVerificationSchema: z.ZodObject<{
|
|
|
564
564
|
status?: "pending" | "complete" | undefined;
|
|
565
565
|
tags?: string[] | undefined;
|
|
566
566
|
token_estimate?: number | undefined;
|
|
567
|
+
inputs?: Record<string, string> | undefined;
|
|
567
568
|
completed_at?: string | undefined;
|
|
568
569
|
file_line_counts?: Record<string, number> | undefined;
|
|
569
|
-
inputs?: Record<string, string> | undefined;
|
|
570
570
|
line_ranges?: {
|
|
571
571
|
path: string;
|
|
572
572
|
end: number;
|
|
@@ -593,9 +593,9 @@ export declare const AuditVerificationSchema: z.ZodObject<{
|
|
|
593
593
|
status?: "pending" | "complete" | undefined;
|
|
594
594
|
tags?: string[] | undefined;
|
|
595
595
|
token_estimate?: number | undefined;
|
|
596
|
+
inputs?: Record<string, string> | undefined;
|
|
596
597
|
completed_at?: string | undefined;
|
|
597
598
|
file_line_counts?: Record<string, number> | undefined;
|
|
598
|
-
inputs?: Record<string, string> | undefined;
|
|
599
599
|
line_ranges?: {
|
|
600
600
|
path: string;
|
|
601
601
|
end: number;
|
|
@@ -629,9 +629,9 @@ export declare const AuditVerificationSchema: z.ZodObject<{
|
|
|
629
629
|
status?: "pending" | "complete" | undefined;
|
|
630
630
|
tags?: string[] | undefined;
|
|
631
631
|
token_estimate?: number | undefined;
|
|
632
|
+
inputs?: Record<string, string> | undefined;
|
|
632
633
|
completed_at?: string | undefined;
|
|
633
634
|
file_line_counts?: Record<string, number> | undefined;
|
|
634
|
-
inputs?: Record<string, string> | undefined;
|
|
635
635
|
line_ranges?: {
|
|
636
636
|
path: string;
|
|
637
637
|
end: number;
|
|
@@ -666,9 +666,9 @@ export declare const AuditVerificationSchema: z.ZodObject<{
|
|
|
666
666
|
status?: "pending" | "complete" | undefined;
|
|
667
667
|
tags?: string[] | undefined;
|
|
668
668
|
token_estimate?: number | undefined;
|
|
669
|
+
inputs?: Record<string, string> | undefined;
|
|
669
670
|
completed_at?: string | undefined;
|
|
670
671
|
file_line_counts?: Record<string, number> | undefined;
|
|
671
|
-
inputs?: Record<string, string> | undefined;
|
|
672
672
|
line_ranges?: {
|
|
673
673
|
path: string;
|
|
674
674
|
end: number;
|
|
@@ -1132,9 +1132,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1132
1132
|
status?: "pending" | "complete" | undefined;
|
|
1133
1133
|
tags?: string[] | undefined;
|
|
1134
1134
|
token_estimate?: number | undefined;
|
|
1135
|
+
inputs?: Record<string, string> | undefined;
|
|
1135
1136
|
completed_at?: string | undefined;
|
|
1136
1137
|
file_line_counts?: Record<string, number> | undefined;
|
|
1137
|
-
inputs?: Record<string, string> | undefined;
|
|
1138
1138
|
line_ranges?: {
|
|
1139
1139
|
path: string;
|
|
1140
1140
|
end: number;
|
|
@@ -1161,9 +1161,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1161
1161
|
status?: "pending" | "complete" | undefined;
|
|
1162
1162
|
tags?: string[] | undefined;
|
|
1163
1163
|
token_estimate?: number | undefined;
|
|
1164
|
+
inputs?: Record<string, string> | undefined;
|
|
1164
1165
|
completed_at?: string | undefined;
|
|
1165
1166
|
file_line_counts?: Record<string, number> | undefined;
|
|
1166
|
-
inputs?: Record<string, string> | undefined;
|
|
1167
1167
|
line_ranges?: {
|
|
1168
1168
|
path: string;
|
|
1169
1169
|
end: number;
|
|
@@ -1197,9 +1197,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1197
1197
|
status?: "pending" | "complete" | undefined;
|
|
1198
1198
|
tags?: string[] | undefined;
|
|
1199
1199
|
token_estimate?: number | undefined;
|
|
1200
|
+
inputs?: Record<string, string> | undefined;
|
|
1200
1201
|
completed_at?: string | undefined;
|
|
1201
1202
|
file_line_counts?: Record<string, number> | undefined;
|
|
1202
|
-
inputs?: Record<string, string> | undefined;
|
|
1203
1203
|
line_ranges?: {
|
|
1204
1204
|
path: string;
|
|
1205
1205
|
end: number;
|
|
@@ -1234,9 +1234,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1234
1234
|
status?: "pending" | "complete" | undefined;
|
|
1235
1235
|
tags?: string[] | undefined;
|
|
1236
1236
|
token_estimate?: number | undefined;
|
|
1237
|
+
inputs?: Record<string, string> | undefined;
|
|
1237
1238
|
completed_at?: string | undefined;
|
|
1238
1239
|
file_line_counts?: Record<string, number> | undefined;
|
|
1239
|
-
inputs?: Record<string, string> | undefined;
|
|
1240
1240
|
line_ranges?: {
|
|
1241
1241
|
path: string;
|
|
1242
1242
|
end: number;
|
|
@@ -1359,9 +1359,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1359
1359
|
status?: "pending" | "complete" | undefined;
|
|
1360
1360
|
tags?: string[] | undefined;
|
|
1361
1361
|
token_estimate?: number | undefined;
|
|
1362
|
+
inputs?: Record<string, string> | undefined;
|
|
1362
1363
|
completed_at?: string | undefined;
|
|
1363
1364
|
file_line_counts?: Record<string, number> | undefined;
|
|
1364
|
-
inputs?: Record<string, string> | undefined;
|
|
1365
1365
|
line_ranges?: {
|
|
1366
1366
|
path: string;
|
|
1367
1367
|
end: number;
|
|
@@ -1482,9 +1482,9 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1482
1482
|
status?: "pending" | "complete" | undefined;
|
|
1483
1483
|
tags?: string[] | undefined;
|
|
1484
1484
|
token_estimate?: number | undefined;
|
|
1485
|
+
inputs?: Record<string, string> | undefined;
|
|
1485
1486
|
completed_at?: string | undefined;
|
|
1486
1487
|
file_line_counts?: Record<string, number> | undefined;
|
|
1487
|
-
inputs?: Record<string, string> | undefined;
|
|
1488
1488
|
line_ranges?: {
|
|
1489
1489
|
path: string;
|
|
1490
1490
|
end: number;
|
|
@@ -41,6 +41,7 @@ export declare function isSignificantLineCountDivergence(got: number, expected:
|
|
|
41
41
|
* the coverage/flow-planning boundary — rather than re-deriving the rules here,
|
|
42
42
|
* because two hand-rolled normalizers ARE two key spaces the moment one of them
|
|
43
43
|
* learns something the other has not (this one previously stripped only a
|
|
44
|
+
* <!-- comment-citation-exempt: illustrative example path -->
|
|
44
45
|
* LEADING `./`, so an interior `src/./x.ts` was a different key from `src/x.ts`).
|
|
45
46
|
*
|
|
46
47
|
* Case is preserved: a repo path is the identity of a real file on disk, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditResults.d.ts","sourceRoot":"","sources":["../../../src/audit/validation/auditResults.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,aAAa,CAAC;AAOtD,OAAO,EAUL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;EAgBrB,CAAC;AAEX,8EAA8E;AAC9E,wBAAgB,eAAe,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GAAG,CAAC,MAAM,CAAC,CAWd;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AA26BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,GAAE,0BAA+B,GACvC,gBAAgB,EAAE,CAmBpB;AA0DD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,GAAE,0BAA+B,GACvC,gBAAgB,EAAE,CA+BpB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAQ1E"}
|
|
@@ -76,6 +76,7 @@ export function isSignificantLineCountDivergence(got, expected) {
|
|
|
76
76
|
* the coverage/flow-planning boundary — rather than re-deriving the rules here,
|
|
77
77
|
* because two hand-rolled normalizers ARE two key spaces the moment one of them
|
|
78
78
|
* learns something the other has not (this one previously stripped only a
|
|
79
|
+
* <!-- comment-citation-exempt: illustrative example path -->
|
|
79
80
|
* LEADING `./`, so an interior `src/./x.ts` was a different key from `src/x.ts`).
|
|
80
81
|
*
|
|
81
82
|
* Case is preserved: a repo path is the identity of a real file on disk, and
|