You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dcc8280
Browse filesBrowse the repository at this point in the historyBrowse files
fix(a2ml-kyx): preflight the work tree, keep names and fields whole, write reports safely
Review findings on #691, each with a test that fails on the previous code
(18 new checks fail there, all 67 pass here):
- family_of uses '|', not a tab: IFS whitespace collapsed an empty spec,
so a contractile reported spec "0" and linked mappings/0.
- .a2ml paths stay NUL-delimited through filter, sort and mapfile, so a
name with a newline is refused whole instead of split.
- jq and sha256sum are checked before anything is classified (exit 69).
- jq gets -- before positional reasons, so a reason starting with '-' is
data.
- The chora deed comes from the index and must be unmodified; the source
must be unmodified; .machine_readable/descriptiles must not be a
symlink; the target must not be gitignored. All asked before kyX runs.
- Staging is all-or-nothing, with a rollback and a refusal on failure.
- The random work directory is replaced by <work> in reasons, so a
refusal keeps its fingerprint across runs.
- A2ML_REPORT_DIR is resolved physically before the containment check;
existing non-regular report paths are refused; reports are renamed into
place, never written through a link.
- The census decodes \u/\U escapes in multi-line strings too.
- *file.a2ml is a contractile only under contractiles/ (as rhodibot, #690).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDhFeexmokLqLRfZNce
@@ -243,6 +300,7 @@ for src in "${eco_sources[@]}"; do
243
300
continue
244
301
fi
245
302
if! bun "$DEED_LINT" --ecosystem --root "$REPO""$out">"$WORK/lint.out"2>&1;then
303
+
scrub "$WORK/lint.out"
246
304
mapfile -t lint <"$WORK/lint.out"
247
305
refuse "$src" ECOSYSTEM "$spec""kyX's output does not pass standards deed_lint --ecosystem --root (canon grammar):""${lint[@]}"
248
306
continue
@@ -255,7 +313,7 @@ for src in "${eco_sources[@]}"; do
255
313
fi
256
314
done
257
315
if! bun "$DEED_LINT" --ast-json "$out">"$WORK/ast.json"2>"$WORK/ast.err";then
258
-
refuse "$src" ECOSYSTEM "$spec""deed_lint --ast-json could not read kyX's output: $(head -c 400 "$WORK/ast.err")"
316
+
refuse "$src" ECOSYSTEM "$spec""deed_lint --ast-json could not read kyX's output: $(scrub "$WORK/ast.err";head -c 400 "$WORK/ast.err")"
259
317
continue
260
318
fi
261
319
crc=0
@@ -265,28 +323,46 @@ for src in "${eco_sources[@]}"; do
265
323
mapfile -t lost <<(jq -r '.missing[] | "value not found in the deed: " + (tojson)'<<<"$census_json")
266
324
refuse "$src" ECOSYSTEM "$spec""not lossless: the value census found source values the deed does not carry:""${lost[@]}"
267
325
else
268
-
refuse "$src" ECOSYSTEM "$spec""the value census could not read the source, so losslessness is unproven: $(head -c 400 "$WORK/census.err")"
326
+
refuse "$src" ECOSYSTEM "$spec""the value census could not read the source, so losslessness is unproven: $(scrub "$WORK/census.err";head -c 400 "$WORK/census.err")"
269
327
fi
270
328
continue
271
329
fi
272
-
# Every gate passed: stage the deed and the deletion.
273
-
mkdir -p "$REPO/$(dirname "$TARGET")"
274
-
cp "$out""$REPO/$TARGET"
275
-
git -C "$REPO" add -- "$TARGET"
276
-
git -C "$REPO" rm -q -- "$src"
330
+
# Every gate passed: stage the deed and the deletion, all or nothing. The
331
+
# preflight makes a failure here unlikely; if one happens anyway, the tree
332
+
# and index are put back and the file is refused with the reason.
"What unblocks each: a kyX front end for the family (metadatastician/kyx), a mapping spec where there is none, or a fix to the source that kyX names.\n",
321
398
"_Opened by gitbot-fleet `scripts/fix-a2ml-via-kyx.sh`; it will not open a second issue for the same refusal._"
0 commit comments