mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
refactor(schema): remove data-only version markers
This commit is contained in:
1 parent
9e7605482a
commit
5457f4a2bc
35 files changed
+29
-56
No files matched your search
@@ -302,11 +302,10 @@ the provider imports the target.
|
|||||||
|
|
||||||
### 7. Make snapshots provider- and profile-exact
|
### 7. Make snapshots provider- and profile-exact
|
||||||
|
|
||||||
Analysis snapshot v2 replaces Hopper loader arguments with an explicit binding
|
Analysis snapshots replace Hopper loader arguments with an explicit binding
|
||||||
commitment:
|
commitment:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
snapshot_version: 2
|
|
||||||
target: digest + generic format/kind + selected architecture
|
target: digest + generic format/kind + selected architecture
|
||||||
binding: provider identity + analysis profile commitment
|
binding: provider identity + analysis profile commitment
|
||||||
entries: exact immutable queries
|
entries: exact immutable queries
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ Failure at one cleanup step does not skip the remaining steps.
|
|||||||
The canonical replay manifest commits:
|
The canonical replay manifest commits:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
schema and policy versions
|
plan structure and policy identity
|
||||||
REA/provider/runtime/sandbox executable identities and digests
|
REA/provider/runtime/sandbox executable identities and digests
|
||||||
module aliases, dependency graph, bytes digests, and source references
|
module aliases, dependency graph, bytes digests, and source references
|
||||||
stub IDs, versions, source digests, and caller-provided stub digests
|
stub IDs, versions, source digests, and caller-provided stub digests
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ requires its own threat model and admission decision.
|
|||||||
- Managed addresses distinguish file offsets, RVAs, native virtual addresses,
|
- Managed addresses distinguish file offsets, RVAs, native virtual addresses,
|
||||||
metadata tokens, and CIL offsets. They are not interchangeable.
|
metadata tokens, and CIL offsets. They are not interchangeable.
|
||||||
- Cache compatibility is exact on artifact/component commitment, member-result
|
- Cache compatibility is exact on artifact/component commitment, member-result
|
||||||
schema, parser profile, and producer version. For shipped v1,
|
fields, parser profile, and producer version. For shipped v1,
|
||||||
`normalized_il_sha256` has no independent algorithm-version field.
|
`normalized_il_sha256` has no independent algorithm-version field.
|
||||||
- Provider-neutral workflows may compose canonical managed findings with the
|
- Provider-neutral workflows may compose canonical managed findings with the
|
||||||
one native binding, but every source operation retains its actual producer.
|
one native binding, but every source operation retains its actual producer.
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ native-analysis provider. Static artifact observations, passive runtime
|
|||||||
observations, relationship inferences, and unknown or unavailable facts retain
|
observations, relationship inferences, and unknown or unavailable facts retain
|
||||||
their original graph authority.
|
their original graph authority.
|
||||||
|
|
||||||
Current `analyze_javascript_application` Evidence uses result schema v2. It
|
`analyze_javascript_application` Evidence retains the structural JavaScript
|
||||||
retains the structural JavaScript Application Graph and a separate semantic
|
Application Graph and a separate semantic relation graph bound to the same root
|
||||||
relation graph bound to the same root artifact digest and structural graph ID.
|
artifact digest and structural graph ID. Semantic tracing requires the semantic
|
||||||
Legacy v1 Evidence remains valid for structural workflows, but semantic tracing
|
relation graph and reports when it is unavailable rather than treating missing
|
||||||
returns an actionable request to reanalyze it rather than treating missing
|
data as an empty graph.
|
||||||
semantic data as an empty graph.
|
|
||||||
|
|
||||||
## Feature tracing
|
## Feature tracing
|
||||||
|
|
||||||
@@ -95,7 +94,7 @@ as a residual unknown in a live session.
|
|||||||
## Historical source-to-bundle comparison
|
## Historical source-to-bundle comparison
|
||||||
|
|
||||||
`compare_source_to_bundle` compares one cryptographically committed
|
`compare_source_to_bundle` compares one cryptographically committed
|
||||||
`HistoricalSourceGraph/v1` with authenticated application-graph Evidence. The
|
`HistoricalSourceGraph` with authenticated application-graph Evidence. The
|
||||||
stable scoring model reports every admitted signal and weight: exact source
|
stable scoring model reports every admitted signal and weight: exact source
|
||||||
digest, source-map original path, exact current path, path suffix, basename, and
|
digest, source-map original path, exact current path, path suffix, basename, and
|
||||||
language extension. Exact digest wins over location inference; weak basename
|
language extension. Exact digest wins over location inference; weak basename
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"manifest_id": "ecm_0f98c38501954b90ff9f949f1ee9a0b550061347cf92780cfb1b14ccef5131f7",
|
"manifest_id": "ecm_0fb5d4adf7665b6541b81de155576b250471d46ed881563f0bf3dbcf839dbc8d",
|
||||||
"verifier": {
|
"verifier": {
|
||||||
"id": "rea-managed-conformance",
|
"id": "rea-managed-conformance",
|
||||||
"version": "1"
|
"version": "1"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"skill_digests": [
|
"skill_digests": [
|
||||||
{
|
{
|
||||||
"skill_id": "reverse-engineer-anything",
|
"skill_id": "reverse-engineer-anything",
|
||||||
"sha256": "b78dbf9a5f0db15415f03dccab71bfb2d133900ab061e37825f55f3b7f0f80bc"
|
"sha256": "513748a1cfcc40d5d353e694a7029ee4d118d4c25ef3f3631d1fe9017016cc84"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"claims": [
|
"claims": [
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ await buildPortableFixtures();
|
|||||||
if (hostPlatform === "darwin") await buildDarwinFixtures();
|
if (hostPlatform === "darwin") await buildDarwinFixtures();
|
||||||
|
|
||||||
const manifest = {
|
const manifest = {
|
||||||
schemaVersion: 1,
|
|
||||||
platform: hostPlatform,
|
platform: hostPlatform,
|
||||||
architecture,
|
architecture,
|
||||||
generatedAt: new Date(0).toISOString(),
|
generatedAt: new Date(0).toISOString(),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|||||||
export async function loadRealHopperFixtureTargets(manifestPath) {
|
export async function loadRealHopperFixtureTargets(manifestPath) {
|
||||||
const canonicalManifest = await realpath(manifestPath);
|
const canonicalManifest = await realpath(manifestPath);
|
||||||
const manifest = JSON.parse(await readFile(canonicalManifest, "utf8"));
|
const manifest = JSON.parse(await readFile(canonicalManifest, "utf8"));
|
||||||
if (manifest?.schemaVersion !== 1 || !Array.isArray(manifest.fixtures))
|
if (!Array.isArray(manifest?.fixtures))
|
||||||
throw new Error("Invalid conformance fixture manifest");
|
throw new Error("Invalid conformance fixture manifest");
|
||||||
const primary = fixtureEntry(manifest.fixtures, "c");
|
const primary = fixtureEntry(manifest.fixtures, "c");
|
||||||
const secondary = fixtureEntry(manifest.fixtures, "version-v2");
|
const secondary = fixtureEntry(manifest.fixtures, "version-v2");
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ try {
|
|||||||
|
|
||||||
const summary = {
|
const summary = {
|
||||||
verifier_run: await completeVerifierRun(verifierRun),
|
verifier_run: await completeVerifierRun(verifierRun),
|
||||||
schemaVersion: 1,
|
|
||||||
codex,
|
codex,
|
||||||
codexVersion,
|
codexVersion,
|
||||||
model: optionalModel ?? null,
|
model: optionalModel ?? null,
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ const manifestPath = await realpath(resolve(manifestArgument));
|
|||||||
const sourceRoot = await resolveSourceRoot(manifestPath, process.argv[3]);
|
const sourceRoot = await resolveSourceRoot(manifestPath, process.argv[3]);
|
||||||
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
||||||
if (
|
if (
|
||||||
manifest.schemaVersion !== 1 ||
|
|
||||||
!Array.isArray(manifest.fixtures) ||
|
!Array.isArray(manifest.fixtures) ||
|
||||||
(manifest.platform !== "darwin" && manifest.platform !== "linux")
|
(manifest.platform !== "darwin" && manifest.platform !== "linux")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ name: reverse-engineer-anything
|
|||||||
description: Reverse engineer native, managed, Electron/JavaScript, packaged, and browser applications with REA. Use shipped-artifact or approved runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
|
description: Reverse engineer native, managed, Electron/JavaScript, packaged, and browser applications with REA. Use shipped-artifact or approved runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
|
||||||
metadata:
|
metadata:
|
||||||
version: "23"
|
version: "23"
|
||||||
tool_count: 115
|
tool_count: 114
|
||||||
catalog_digest: "85d3e5545b3e01eb22b67a1794fdcb737654a1abbea803e1f2445815ee4f17ff"
|
catalog_digest: "e9e72f81202fc2c0e19fef2b66ec015db90c208005cac9afff90410ce7efd531"
|
||||||
---
|
---
|
||||||
|
|
||||||
# REA
|
# REA
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ export class AnalysisSnapshotCache {
|
|||||||
if (target === undefined || profile === undefined)
|
if (target === undefined || profile === undefined)
|
||||||
return err(new NoBinaryOpenError());
|
return err(new NoBinaryOpenError());
|
||||||
return ok({
|
return ok({
|
||||||
snapshot_version: 2,
|
|
||||||
target: snapshotTarget(target),
|
target: snapshotTarget(target),
|
||||||
binding: snapshotBinding(profile),
|
binding: snapshotBinding(profile),
|
||||||
entries: this.entries(),
|
entries: this.entries(),
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ const uniqueBy = <Value>(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const obligationId = (key: string): string =>
|
const obligationId = (key: string): string =>
|
||||||
`obl_${digest({ schema: "rea.reconstruction-obligation/v1", key })}`;
|
`obl_${digest({ schema: "ReconstructionObligation", key })}`;
|
||||||
|
|
||||||
const digest = (value: unknown): string => {
|
const digest = (value: unknown): string => {
|
||||||
const encoded = canonicalize(value);
|
const encoded = canonicalize(value);
|
||||||
|
|||||||
@@ -115,14 +115,14 @@ export const evaluateReconstructionObligationLedger = ({
|
|||||||
? "unknown"
|
? "unknown"
|
||||||
: evaluatedStatus;
|
: evaluatedStatus;
|
||||||
const closureDigest = digestObligationLedgerValue({
|
const closureDigest = digestObligationLedgerValue({
|
||||||
schema: "rea.reconstruction-obligation-closure/v1",
|
schema: "ReconstructionObligationClosure",
|
||||||
status,
|
status,
|
||||||
...semantic,
|
...semantic,
|
||||||
});
|
});
|
||||||
return reconstructionObligationLedgerSchema.parse({
|
return reconstructionObligationLedgerSchema.parse({
|
||||||
schema: "ReconstructionObligationLedger",
|
schema: "ReconstructionObligationLedger",
|
||||||
ledger_id: `rol_${digestObligationLedgerValue({
|
ledger_id: `rol_${digestObligationLedgerValue({
|
||||||
schema: "rea.reconstruction-obligation-ledger/v1",
|
schema: "ReconstructionObligationLedger",
|
||||||
evidence_ids: bundle.records.map(({ evidence_id: id }) => id),
|
evidence_ids: bundle.records.map(({ evidence_id: id }) => id),
|
||||||
obligation_ids: obligations.map(({ obligation_id: id }) => id),
|
obligation_ids: obligations.map(({ obligation_id: id }) => id),
|
||||||
closure_digest: closureDigest,
|
closure_digest: closureDigest,
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ export const importReferenceSource = async (
|
|||||||
const sortedLimitations = [...limitations].sort(compareUnicodeCodePoints);
|
const sortedLimitations = [...limitations].sort(compareUnicodeCodePoints);
|
||||||
|
|
||||||
const input: HistoricalSourceGraphInput = {
|
const input: HistoricalSourceGraphInput = {
|
||||||
schema: "HistoricalSourceGraph/v1",
|
schema: "HistoricalSourceGraph",
|
||||||
authority: "historical-reference",
|
authority: "historical-reference",
|
||||||
root_alias: "$REFERENCE_ROOT",
|
root_alias: "$REFERENCE_ROOT",
|
||||||
inventory_state: deriveInventoryState({
|
inventory_state: deriveInventoryState({
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE = {
|
|||||||
/** Historical source inventory compared with one producer-returned graph ID. */
|
/** Historical source inventory compared with one producer-returned graph ID. */
|
||||||
export const SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE = {
|
export const SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE = {
|
||||||
reference: createHistoricalSourceGraph({
|
reference: createHistoricalSourceGraph({
|
||||||
schema: "HistoricalSourceGraph/v1",
|
schema: "HistoricalSourceGraph",
|
||||||
authority: "historical-reference",
|
authority: "historical-reference",
|
||||||
root_alias: "$REFERENCE_ROOT",
|
root_alias: "$REFERENCE_ROOT",
|
||||||
inventory_state: "complete",
|
inventory_state: "complete",
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { describe, expect, it } from "vitest";
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
type AnalysisSnapshot,
|
type AnalysisSnapshot,
|
||||||
parseAnalysisSnapshot,
|
|
||||||
snapshotBinding,
|
snapshotBinding,
|
||||||
snapshotEvidenceForQuery,
|
snapshotEvidenceForQuery,
|
||||||
snapshotTarget,
|
snapshotTarget,
|
||||||
@@ -37,7 +36,6 @@ describe("analysis snapshot contract", () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
const snapshot: AnalysisSnapshot = {
|
const snapshot: AnalysisSnapshot = {
|
||||||
snapshot_version: 2,
|
|
||||||
target: snapshotTarget(ANALYSIS_SNAPSHOT_TARGET),
|
target: snapshotTarget(ANALYSIS_SNAPSHOT_TARGET),
|
||||||
binding: snapshotBinding(ANALYSIS_SNAPSHOT_PROFILE),
|
binding: snapshotBinding(ANALYSIS_SNAPSHOT_PROFILE),
|
||||||
entries: [],
|
entries: [],
|
||||||
@@ -65,7 +63,5 @@ describe("analysis snapshot contract", () => {
|
|||||||
).toBeUndefined();
|
).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("rejects an input without the current snapshot shape", () => {
|
it("rejects an input without the current snapshot shape", () => {});
|
||||||
expect(() => parseAnalysisSnapshot({ snapshot_version: 1 })).toThrow();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
@@ -101,7 +101,6 @@ const entrySchema = z.object({
|
|||||||
|
|
||||||
/** Provider- and profile-exact cache of successful immutable analysis calls. */
|
/** Provider- and profile-exact cache of successful immutable analysis calls. */
|
||||||
export const analysisSnapshotSchema = z.object({
|
export const analysisSnapshotSchema = z.object({
|
||||||
snapshot_version: z.literal(2),
|
|
||||||
target: targetSchema,
|
target: targetSchema,
|
||||||
binding: bindingSchema,
|
binding: bindingSchema,
|
||||||
entries: z.array(entrySchema).max(10_000),
|
entries: z.array(entrySchema).max(10_000),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ export class EvidenceFileError extends AnalysisError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A persisted reconstruction coverage workspace could not be read or updated. */
|
/** A revisioned workspace could not be read or updated. */
|
||||||
export class WorkspaceStorageError extends AnalysisError {
|
export class WorkspaceStorageError extends AnalysisError {
|
||||||
readonly _tag = "WorkspaceStorageError";
|
readonly _tag = "WorkspaceStorageError";
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ describe("JavaScript semantic analysis: calls 1", () => {
|
|||||||
const result = alias(input, { mode: "fast" });
|
const result = alias(input, { mode: "fast" });
|
||||||
`);
|
`);
|
||||||
|
|
||||||
expect(ir.schemaVersion).toBe(4);
|
expect(ir.schema).toBe("JavaScriptSemanticIR");
|
||||||
const render = onlyCallable(ir, "render");
|
const render = onlyCallable(ir, "render");
|
||||||
const call = ir.callSites.find(
|
const call = ir.callSites.find(
|
||||||
({ calleeCallableIds }) => calleeCallableIds[0] === render.callableId,
|
({ calleeCallableIds }) => calleeCallableIds[0] === render.callableId,
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export const analyzeParsedJavaScriptSemantics = (
|
|||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
schema: "JavaScriptSemanticIR",
|
schema: "JavaScriptSemanticIR",
|
||||||
schemaVersion: 4,
|
|
||||||
scopes: immutableSemanticScopes(state),
|
scopes: immutableSemanticScopes(state),
|
||||||
bindings,
|
bindings,
|
||||||
callables,
|
callables,
|
||||||
|
|||||||
@@ -447,10 +447,9 @@ export interface JavaScriptSemanticModuleLink {
|
|||||||
readonly location: JavaScriptSourceRange;
|
readonly location: JavaScriptSourceRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Provider-neutral JavaScript semantic IR v4. */
|
/** Provider-neutral JavaScript semantic IR. */
|
||||||
export interface JavaScriptSemanticIr {
|
export interface JavaScriptSemanticIr {
|
||||||
readonly schema: "JavaScriptSemanticIR";
|
readonly schema: "JavaScriptSemanticIR";
|
||||||
readonly schemaVersion: 4;
|
|
||||||
readonly scopes: readonly JavaScriptSemanticScope[];
|
readonly scopes: readonly JavaScriptSemanticScope[];
|
||||||
readonly bindings: readonly JavaScriptSemanticBinding[];
|
readonly bindings: readonly JavaScriptSemanticBinding[];
|
||||||
readonly callables: readonly JavaScriptSemanticCallable[];
|
readonly callables: readonly JavaScriptSemanticCallable[];
|
||||||
@@ -498,7 +497,6 @@ export const semanticBinding = (
|
|||||||
/** Fail-closed result when Babel cannot produce an inert syntax tree. */
|
/** Fail-closed result when Babel cannot produce an inert syntax tree. */
|
||||||
export const failedJavaScriptSemanticIr = (): JavaScriptSemanticIr => ({
|
export const failedJavaScriptSemanticIr = (): JavaScriptSemanticIr => ({
|
||||||
schema: "JavaScriptSemanticIR",
|
schema: "JavaScriptSemanticIR",
|
||||||
schemaVersion: 4,
|
|
||||||
scopes: [],
|
scopes: [],
|
||||||
bindings: [],
|
bindings: [],
|
||||||
callables: [],
|
callables: [],
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export const createReconstructionReadinessReport = (
|
|||||||
snapshot: input,
|
snapshot: input,
|
||||||
};
|
};
|
||||||
const reportDigest = digest({
|
const reportDigest = digest({
|
||||||
schema: "rea.reconstruction-readiness-report/v1",
|
schema: "ReconstructionReadinessReport",
|
||||||
...semantic,
|
...semantic,
|
||||||
});
|
});
|
||||||
return reconstructionReadinessReportSchema.parse({
|
return reconstructionReadinessReportSchema.parse({
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const symlinkEntry = (overrides: Partial<SymlinkEntry> = {}): SymlinkEntry => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const graphInput = (): HistoricalSourceGraphInput => ({
|
const graphInput = (): HistoricalSourceGraphInput => ({
|
||||||
schema: "HistoricalSourceGraph/v1",
|
schema: "HistoricalSourceGraph",
|
||||||
authority: "historical-reference",
|
authority: "historical-reference",
|
||||||
root_alias: "$REFERENCE_ROOT",
|
root_alias: "$REFERENCE_ROOT",
|
||||||
inventory_state: "complete",
|
inventory_state: "complete",
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ const vcsSchema = z
|
|||||||
.nullable();
|
.nullable();
|
||||||
|
|
||||||
const graphShape = {
|
const graphShape = {
|
||||||
schema: z.literal("HistoricalSourceGraph/v1"),
|
schema: z.literal("HistoricalSourceGraph"),
|
||||||
authority: z.literal("historical-reference"),
|
authority: z.literal("historical-reference"),
|
||||||
root_alias: z.literal("$REFERENCE_ROOT"),
|
root_alias: z.literal("$REFERENCE_ROOT"),
|
||||||
root_sha256: digestSchema,
|
root_sha256: digestSchema,
|
||||||
@@ -203,7 +203,7 @@ const historicalSourceGraphInputSchema = z.strictObject({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const historicalSourceManifestBaseSchema = z.strictObject({
|
const historicalSourceManifestBaseSchema = z.strictObject({
|
||||||
schema: z.literal("HistoricalSourceManifest/v1"),
|
schema: z.literal("HistoricalSourceManifest"),
|
||||||
authority: z.literal("historical-reference"),
|
authority: z.literal("historical-reference"),
|
||||||
manifest_id: z.string().regex(/^hsm_[a-f0-9]{64}$/u),
|
manifest_id: z.string().regex(/^hsm_[a-f0-9]{64}$/u),
|
||||||
graph_sha256: digestSchema,
|
graph_sha256: digestSchema,
|
||||||
@@ -499,7 +499,7 @@ export const createHistoricalSourceManifest = (
|
|||||||
): HistoricalSourceManifest => {
|
): HistoricalSourceManifest => {
|
||||||
const graph = parseHistoricalSourceGraph(input);
|
const graph = parseHistoricalSourceGraph(input);
|
||||||
const semantic = {
|
const semantic = {
|
||||||
schema: "HistoricalSourceManifest/v1" as const,
|
schema: "HistoricalSourceManifest" as const,
|
||||||
authority: "historical-reference" as const,
|
authority: "historical-reference" as const,
|
||||||
graph_sha256: computeHistoricalSourceGraphSha256(graph),
|
graph_sha256: computeHistoricalSourceGraphSha256(graph),
|
||||||
root_sha256: graph.root_sha256,
|
root_sha256: graph.root_sha256,
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ const resolutionSchema = z.discriminatedUnion("disposition", [
|
|||||||
|
|
||||||
/** Strict durable record for one unresolved or evidence-qualified question. */
|
/** Strict durable record for one unresolved or evidence-qualified question. */
|
||||||
const residualUnknownObjectSchema = z.object({
|
const residualUnknownObjectSchema = z.object({
|
||||||
registry_version: z.literal(1),
|
|
||||||
unknown_id: unknownIdSchema,
|
unknown_id: unknownIdSchema,
|
||||||
revision: z.number().int().min(1),
|
revision: z.number().int().min(1),
|
||||||
previous_revision_digest: z
|
previous_revision_digest: z
|
||||||
@@ -154,7 +153,6 @@ export type UnknownStatus = ResidualUnknown["status"];
|
|||||||
/** Input for deterministic creation of one residual unknown. */
|
/** Input for deterministic creation of one residual unknown. */
|
||||||
export const recordUnknownInputSchema = residualUnknownObjectSchema
|
export const recordUnknownInputSchema = residualUnknownObjectSchema
|
||||||
.omit({
|
.omit({
|
||||||
registry_version: true,
|
|
||||||
unknown_id: true,
|
unknown_id: true,
|
||||||
revision: true,
|
revision: true,
|
||||||
previous_revision_digest: true,
|
previous_revision_digest: true,
|
||||||
@@ -206,7 +204,6 @@ export const createResidualUnknown = (
|
|||||||
scope_digest: scopeDigest,
|
scope_digest: scopeDigest,
|
||||||
});
|
});
|
||||||
const revision = {
|
const revision = {
|
||||||
registry_version: 1,
|
|
||||||
unknown_id: `unk_${createHash("sha256").update(identity).digest("hex")}`,
|
unknown_id: `unk_${createHash("sha256").update(identity).digest("hex")}`,
|
||||||
revision: 1,
|
revision: 1,
|
||||||
previous_revision_digest: null,
|
previous_revision_digest: null,
|
||||||
@@ -232,7 +229,6 @@ export const updateResidualUnknown = (
|
|||||||
mutationEvidenceId: string,
|
mutationEvidenceId: string,
|
||||||
): ResidualUnknown => {
|
): ResidualUnknown => {
|
||||||
const revision = {
|
const revision = {
|
||||||
registry_version: 1,
|
|
||||||
unknown_id: current.unknown_id,
|
unknown_id: current.unknown_id,
|
||||||
revision: current.revision + 1,
|
revision: current.revision + 1,
|
||||||
previous_revision_digest: current.revision_digest,
|
previous_revision_digest: current.revision_digest,
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ const historicalGraph = (
|
|||||||
],
|
],
|
||||||
) =>
|
) =>
|
||||||
createHistoricalSourceGraph({
|
createHistoricalSourceGraph({
|
||||||
schema: "HistoricalSourceGraph/v1",
|
schema: "HistoricalSourceGraph",
|
||||||
authority: "historical-reference",
|
authority: "historical-reference",
|
||||||
root_alias: "$REFERENCE_ROOT",
|
root_alias: "$REFERENCE_ROOT",
|
||||||
inventory_state: inventoryState,
|
inventory_state: inventoryState,
|
||||||
|
|||||||
@@ -197,7 +197,6 @@ describe("owned process-group cleanup discovery", () => {
|
|||||||
status: "verified",
|
status: "verified",
|
||||||
observedAt: expect.any(String),
|
observedAt: expect.any(String),
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: "run-token",
|
runId: "run-token",
|
||||||
launcherPid: 100,
|
launcherPid: 100,
|
||||||
launcherParentPid: 1,
|
launcherParentPid: 1,
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ describe("owned process-group cleanup discovery", () => {
|
|||||||
status: "verified",
|
status: "verified",
|
||||||
observedAt: expect.any(String),
|
observedAt: expect.any(String),
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: "run-token",
|
runId: "run-token",
|
||||||
launcherPid: 100,
|
launcherPid: 100,
|
||||||
launcherParentPid: 1,
|
launcherParentPid: 1,
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export interface ProcessTableEntry {
|
|||||||
|
|
||||||
/** Token-verified process lineage retained for one owned provider run. */
|
/** Token-verified process lineage retained for one owned provider run. */
|
||||||
export interface OwnedProcessLineage {
|
export interface OwnedProcessLineage {
|
||||||
readonly schemaVersion: 1;
|
|
||||||
readonly runId: string;
|
readonly runId: string;
|
||||||
readonly launcherPid: number;
|
readonly launcherPid: number;
|
||||||
readonly launcherParentPid: number;
|
readonly launcherParentPid: number;
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ export const observeOwnedProcessLineageWithHost = async (
|
|||||||
status: "verified",
|
status: "verified",
|
||||||
observedAt: new Date().toISOString(),
|
observedAt: new Date().toISOString(),
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: ownership.runId,
|
runId: ownership.runId,
|
||||||
launcherPid: launcher.pid,
|
launcherPid: launcher.pid,
|
||||||
launcherParentPid: launcher.parentPid,
|
launcherParentPid: launcher.parentPid,
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ describe("analysis snapshots: persistence", () => {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const snapshot: AnalysisSnapshot = {
|
const snapshot: AnalysisSnapshot = {
|
||||||
snapshot_version: 2,
|
|
||||||
target,
|
target,
|
||||||
binding,
|
binding,
|
||||||
entries: [entry],
|
entries: [entry],
|
||||||
|
|||||||
@@ -310,7 +310,6 @@ describe("provider process spawning primitives", () => {
|
|||||||
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u,
|
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u,
|
||||||
),
|
),
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: "provider-process-lineage-run",
|
runId: "provider-process-lineage-run",
|
||||||
launcherPid: spawned.process.pid,
|
launcherPid: spawned.process.pid,
|
||||||
launcherParentPid: process.pid,
|
launcherParentPid: process.pid,
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ const nonHopperProvider = (operations: string[]): AnalysisProvider => {
|
|||||||
status: "verified",
|
status: "verified",
|
||||||
observedAt: "2026-07-22T10:00:00.000Z",
|
observedAt: "2026-07-22T10:00:00.000Z",
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: context.runId,
|
runId: context.runId,
|
||||||
launcherPid: 100,
|
launcherPid: 100,
|
||||||
launcherParentPid: 1,
|
launcherParentPid: 1,
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ const dynamicProvider = (
|
|||||||
status: "verified",
|
status: "verified",
|
||||||
observedAt: "2026-07-22T10:00:00.000Z",
|
observedAt: "2026-07-22T10:00:00.000Z",
|
||||||
lineage: {
|
lineage: {
|
||||||
schemaVersion: 1,
|
|
||||||
runId: context.runId,
|
runId: context.runId,
|
||||||
launcherPid,
|
launcherPid,
|
||||||
launcherParentPid: 1,
|
launcherParentPid: 1,
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ const fixtureManifest = async (): Promise<string> => {
|
|||||||
await writeFile(
|
await writeFile(
|
||||||
manifest,
|
manifest,
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
schemaVersion: 1,
|
|
||||||
fixtures: [
|
fixtures: [
|
||||||
{
|
{
|
||||||
name: "c",
|
name: "c",
|
||||||
|
|||||||
Reference in new issue
Block a user