tickmarkr 2.8.7 → 2.8.8

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.
@@ -48,12 +48,42 @@ export function classifyRepairDisposition(input) {
48
48
  return { paths: r.resolved.filter((path) => !allowed(path)), diagnostics: r.diagnostics };
49
49
  };
50
50
  const owned = (text) => resolveScopeHints(namedPaths(text), inventory).resolved.some(allowed);
51
+ // Queue row 235 (D-2134): acceptance prose quotes declarations; only execution and typed evidence
52
+ // attribute a repair. A misplaced declared landing is authoritative even when it was never written.
53
+ const acceptanceEvidence = (g) => {
54
+ if (Array.isArray(g.meta?.oracles)) {
55
+ const paths = [];
56
+ const landings = [];
57
+ for (const oracle of g.meta.oracles) {
58
+ if (!oracle || typeof oracle !== "object")
59
+ continue;
60
+ if (typeof oracle.output === "string")
61
+ paths.push(...namedPaths(oracle.output));
62
+ if (["absent", "elsewhere", "untitled"].includes(oracle.failure) && typeof oracle.landing === "string" && !allowed(oracle.landing)) {
63
+ landings.push(oracle.landing);
64
+ }
65
+ }
66
+ return { paths, landings };
67
+ }
68
+ const judgment = g.meta?.judgment;
69
+ const criteria = Array.isArray(judgment) ? judgment
70
+ : judgment && typeof judgment === "object" && "criteria" in judgment ? judgment.criteria : undefined;
71
+ const paths = Array.isArray(criteria) ? criteria.flatMap((row) => row?.met === false && Array.isArray(row.paths) ? row.paths.filter((path) => typeof path === "string") : []) : [];
72
+ return { paths, landings: [] };
73
+ };
51
74
  const refusal = input.refusalSummary !== undefined && REFUSAL_RE.test(input.refusalSummary)
52
75
  ? unowned(input.refusalSummary) : { paths: [], diagnostics: [] };
53
76
  // A test gate names where the ASSERTION lives — a detection site, not the code that needs fixing.
54
77
  const sites = reds.filter((g) => g.gate === "test").map((g) => unowned(g.details));
55
78
  const others = reds.filter((g) => g.gate !== "test");
56
- const hints = others.map((g) => unowned(g.details));
79
+ const evidence = others.map((g) => g.gate === "acceptance" ? acceptanceEvidence(g) : undefined);
80
+ const hints = others.map((g, i) => {
81
+ const e = evidence[i];
82
+ if (!e)
83
+ return unowned(g.details);
84
+ const r = resolveScopeHints(e.paths.filter((path) => !allowed(path)), inventory);
85
+ return { paths: [...e.landings, ...r.resolved.filter((path) => !allowed(path))], diagnostics: r.diagnostics };
86
+ });
57
87
  const diagnostics = [refusal, ...sites, ...hints].flatMap((r) => r.diagnostics)
58
88
  .filter((d, i, all) => all.findIndex((o) => o.candidate === d.candidate) === i);
59
89
  const uniq = (rs) => [...new Set(rs.flatMap((r) => r.paths))].sort();
@@ -62,7 +92,8 @@ export function classifyRepairDisposition(input) {
62
92
  reason: `worker refusal names unowned paths: ${refusal.paths.join(", ")}` };
63
93
  }
64
94
  const repair = uniq(hints);
65
- if (repair.length && !others.some((g) => owned(g.details))) {
95
+ if (repair.length && !others.some((g, i) => evidence[i]
96
+ ? resolveScopeHints(evidence[i].paths, inventory).resolved.some(allowed) : owned(g.details))) {
66
97
  const review = others.some((g) => g.gate === "review");
67
98
  return { kind: review ? "scope-request" : "authoring", paths: repair, source: others[0].gate, diagnostics,
68
99
  reason: `files[] repair hint: ${repair.join(", ")}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tickmarkr",
3
- "version": "2.8.7",
3
+ "version": "2.8.8",
4
4
  "description": "Spec in, verified work out.",
5
5
  "type": "module",
6
6
  "license": "MIT",