sortie-dogs 0.10.2 → 0.10.3
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/README.md
CHANGED
|
@@ -74,7 +74,7 @@ bounded implementation, canonical validation, and evidence-backed completion.
|
|
|
74
74
|
|
|
75
75
|
Guides: [日本語](docs/guide-ja.md) · [简体中文](docs/guide-zh-CN.md) · [テスト実行](docs/testing.md) · [CLI testing](docs/cli-testing.md)
|
|
76
76
|
|
|
77
|
-
Release: [v0.10.
|
|
77
|
+
Release: [v0.10.3](https://github.com/zufall-upon/Sortie-dogs/releases/tag/v0.10.3)
|
|
78
78
|
|
|
79
79
|
## Latest local benchmark case study
|
|
80
80
|
|
|
@@ -2,7 +2,12 @@ export declare const ACCEPTANCE_CONTINUITY_EXTENSION: "sortie-dogs/acceptance-co
|
|
|
2
2
|
export declare const ACCEPTANCE_CONTINUITY_SCHEMA_VERSION: "0.1";
|
|
3
3
|
export declare const ACCEPTANCE_CONTINUITY_AUTHORITY: "dispatch";
|
|
4
4
|
export declare const MAX_ACCEPTANCE_CONTINUITY_BYTES: number;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* One shared criterion bound for frozen intent requirements, parsed operator plans, and this
|
|
7
|
+
* ledger. A lower ledger bound silently rejects an otherwise valid accepted scope at worker
|
|
8
|
+
* inspection, so the count stays aligned here and the byte cap above remains the real payload limit.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MAX_ACCEPTANCE_CRITERIA = 64;
|
|
6
11
|
export interface AcceptanceContinuityLedger {
|
|
7
12
|
readonly schema_version: "0.1";
|
|
8
13
|
readonly authority: "dispatch";
|
|
@@ -3,7 +3,12 @@ export const ACCEPTANCE_CONTINUITY_EXTENSION = "sortie-dogs/acceptance-continuit
|
|
|
3
3
|
export const ACCEPTANCE_CONTINUITY_SCHEMA_VERSION = "0.1";
|
|
4
4
|
export const ACCEPTANCE_CONTINUITY_AUTHORITY = "dispatch";
|
|
5
5
|
export const MAX_ACCEPTANCE_CONTINUITY_BYTES = 32 * 1024;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* One shared criterion bound for frozen intent requirements, parsed operator plans, and this
|
|
8
|
+
* ledger. A lower ledger bound silently rejects an otherwise valid accepted scope at worker
|
|
9
|
+
* inspection, so the count stays aligned here and the byte cap above remains the real payload limit.
|
|
10
|
+
*/
|
|
11
|
+
export const MAX_ACCEPTANCE_CRITERIA = 64;
|
|
7
12
|
const FINGERPRINT = /^sha256:[0-9a-f]{64}$/u;
|
|
8
13
|
const MAX_TASK_ID = 256;
|
|
9
14
|
const MAX_CRITERION = 2_000;
|
|
@@ -3,7 +3,7 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import { lstat, mkdir, open, readFile, realpath, rename, rm, unlink, writeFile } from "node:fs/promises";
|
|
4
4
|
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
|
-
import { acceptanceContinuityFingerprint, normalizeAcceptanceCriteria, ACCEPTANCE_CONTINUITY_EXTENSION } from "./acceptance-continuity.js";
|
|
6
|
+
import { acceptanceContinuityFingerprint, inspectAcceptanceContinuity, normalizeAcceptanceCriteria, ACCEPTANCE_CONTINUITY_EXTENSION, MAX_ACCEPTANCE_CONTINUITY_BYTES, MAX_ACCEPTANCE_CRITERIA } from "./acceptance-continuity.js";
|
|
7
7
|
import { expandGoalDeclaration, goalDeclarationDefaults, hasGoalCommandAliasConflict } from "./goal-declaration-format.js";
|
|
8
8
|
import { normalizeRelativePath } from "./path.js";
|
|
9
9
|
import { CONTRACT_TEXT_LIMITS, validateHandoffSchema, validateOperationManifestSchema } from "./validate-schema.js";
|
|
@@ -68,6 +68,11 @@ export function parseOperatorPlan(value) {
|
|
|
68
68
|
return planError("/schema_version", "operator-plan-invalid", "schema-version");
|
|
69
69
|
if (!strings(value.acceptance, true))
|
|
70
70
|
return planError("/acceptance", "operator-plan-invalid", "nonempty-string-array");
|
|
71
|
+
if (value.acceptance.length > MAX_ACCEPTANCE_CRITERIA) {
|
|
72
|
+
return contractError({ document: "plan", pointer: "/acceptance", code: "operator-plan-acceptance-too-many",
|
|
73
|
+
rule: "bounded-accepted-criteria", repair_kind: "repair-field",
|
|
74
|
+
length: value.acceptance.length, limit: MAX_ACCEPTANCE_CRITERIA });
|
|
75
|
+
}
|
|
71
76
|
if (!strings(value.source_refs, true))
|
|
72
77
|
return planError("/source_refs", "operator-plan-invalid", "nonempty-string-array");
|
|
73
78
|
if (!record(value.goal_declaration))
|
|
@@ -715,6 +720,18 @@ export class OperatorRuntime {
|
|
|
715
720
|
diagnostics.push(...h.diagnostics.map(item => diagnostic("handoff", item)));
|
|
716
721
|
if (!m.ok)
|
|
717
722
|
diagnostics.push(...m.diagnostics.map(item => diagnostic("manifest", item)));
|
|
723
|
+
// The worker refuses a malformed or oversize continuity ledger before it reads any source, so the
|
|
724
|
+
// generated ledger is inspected here instead of exposing that internal mismatch after dispatch.
|
|
725
|
+
const continuity = inspectAcceptanceContinuity(handoff);
|
|
726
|
+
if (continuity.error !== undefined) {
|
|
727
|
+
diagnostics.push({ document: "handoff", pointer: "/ext/acceptance-continuity", unit_index: index,
|
|
728
|
+
code: `operator-acceptance-continuity-${continuity.error}`, rule: "worker-readable-acceptance-ledger",
|
|
729
|
+
repair_kind: "repair-field",
|
|
730
|
+
...(continuity.error === "oversize"
|
|
731
|
+
? { length: new TextEncoder().encode(JSON.stringify(handoff.ext[ACCEPTANCE_CONTINUITY_EXTENSION])).byteLength,
|
|
732
|
+
limit: MAX_ACCEPTANCE_CONTINUITY_BYTES }
|
|
733
|
+
: {}) });
|
|
734
|
+
}
|
|
718
735
|
if (h.ok && m.ok)
|
|
719
736
|
diagnostics.push(...validateManifest(h.value, m.value, undefined, false, { requirePassedValidation: false })
|
|
720
737
|
.filter(item => item.severity === "error").map(item => ({ document: "handoff", pointer: item.pointer,
|