fix: introspect the filesystem workspace before FK suggestion

This commit is contained in:
2026-08-11 19:32:57 +02:00
parent 93017b5eb6
commit c994b3ef68
+2
View File
@@ -1163,6 +1163,8 @@ async function realChecks(ctx) {
{
id: "schema_review",
async run() {
// FK suggestion consumes the workspace's own introspected physical schema.
await runThothctlJson(ctx, "preprocess-dwh-filesystem", ["workspace", "preprocess", "dwh", "--workspace", "p2-filesystem"], 0);
const suggest = await runThothctlJson(ctx, "schema-suggest-filesystem", ["workspace", "schema", "suggest-fks", "--workspace", "p2-filesystem"], 3);
assert(suggest.payload.code === "manual_review_required", "suggest did not block");
assert(typeof suggest.payload.suggestedFksYaml === "string" && suggest.payload.suggestedFksYaml.length > 0, "suggested FK YAML missing");