feat: register Workspace Profiles as Decodal values (T-710)
Project the evaluated Workspace Profile value into a revision-bound JSON archive without source-path registration or Decodal re-evaluation. Preserve partial-value omissions and explicit overrides, validate before save, and reject legacy registrations with a documented explicit migration.
Fix array-element schema completion and provide fingerprint-bound authoring shapes independently of materialization defaults. Carry metadata through REST, regenerate TypeScript/OpenAPI/WASM artifacts, and exercise save/projection/Runtime consumption and persisted Manifest restore boundaries.
Validation: root cargo check; cargo test -p config-source; cargo test -p worker-runtime; cargo test -p server-api --features typescript; focused profile_settings/value_profiles/archive tests; 39 web config-source/profile API tests; deno task check; cargo fmt --all -- --check; git diff --check HEAD.
Full workspace-server test: 641 passed, one pre-existing ticket_checker_suppresses_stale_and_clean_results_and_diagnoses_invalid_output assertion failure. The same filter fails at base 3c424fd17d in a separately archived source tree and isolated target directory. Remaining server crate tests pass with only that filter skipped (641 lib + 11 bin); unrelated checker code is unchanged.
This commit is contained in:
@@ -244,3 +244,41 @@ Deno.test("config source API surfaces bounded failed evaluation details", async
|
||||
}
|
||||
assert(message.includes("structured diagnostics"));
|
||||
});
|
||||
|
||||
Deno.test("config source API carries bounded optional authoring schemas without changing validation source", () => {
|
||||
const body = withSchema("validation");
|
||||
const authoringSource = "shape\n".repeat(6000);
|
||||
const contribution = {
|
||||
...body.contract.schema_bundle.contributions[0],
|
||||
authoring_source: authoringSource,
|
||||
};
|
||||
const withAuthoring = {
|
||||
...body,
|
||||
contract: {
|
||||
...body.contract,
|
||||
schema_bundle: {
|
||||
...body.contract.schema_bundle,
|
||||
contributions: [contribution],
|
||||
},
|
||||
},
|
||||
};
|
||||
const parsed = parseWorkspaceConfigTreeResponse(withAuthoring);
|
||||
assertEquals(
|
||||
parsed.contract.schema_bundle.contributions[0].authoring_source,
|
||||
authoringSource,
|
||||
);
|
||||
assertEquals(parsed.contract.schema_bundle.source, "validation");
|
||||
for (const invalid of [null, 42, {}, "é".repeat(4 * 1024 * 1024) + "x"]) {
|
||||
assertThrows(() =>
|
||||
parseWorkspaceConfigTreeResponse({
|
||||
...withAuthoring,
|
||||
contract: {
|
||||
...body.contract,
|
||||
schema_bundle: {
|
||||
...body.contract.schema_bundle,
|
||||
contributions: [{ ...contribution, authoring_source: invalid }],
|
||||
},
|
||||
},
|
||||
}), ConfigSourceApiError);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user