@mrciphersmith/keryx 0.2.131 → 0.2.132

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/dist/cli.js CHANGED
@@ -51129,7 +51129,7 @@ import path47 from "path";
51129
51129
  // package.json
51130
51130
  var package_default = {
51131
51131
  name: "@mrciphersmith/keryx",
51132
- version: "0.2.131",
51132
+ version: "0.2.132",
51133
51133
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
51134
51134
  private: false,
51135
51135
  publishConfig: {
@@ -59098,7 +59098,7 @@ init_provenance();
59098
59098
 
59099
59099
  // src/sync/diff.ts
59100
59100
  init_provenance();
59101
- var CODE_EXT2 = /\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs|java|rb|php|c|h|cc|cpp|hpp|cs|swift|kt|scala|sh|vue|svelte)$/;
59101
+ var CODE_EXT2 = /\.(ts|tsx|mts|cts|js|jsx|mjs|cjs|py|go|rs|java|rb|php|c|h|cc|cpp|hpp|cs|swift|kt|scala|sh|vue|svelte)$/;
59102
59102
  function isCodeFile(file) {
59103
59103
  return CODE_EXT2.test(file);
59104
59104
  }
@@ -59220,7 +59220,22 @@ On git pull / branch switch, they run 'keryx sync' (advisory report). Run 'keryx
59220
59220
  }
59221
59221
  const code = codeOnly(diff);
59222
59222
  if (totalChanges(code) === 0) {
59223
- console.log(` up to date (built at ${provenance.commit.slice(0, 8)})`);
59223
+ if (apply && provenance.commit !== head.commit) {
59224
+ if (module === "gdwiki") {
59225
+ const gate = await resolveWikiSourceGate(cwd, HEAD_NOT_REQUESTED);
59226
+ if (gate.status !== "fresh") {
59227
+ printApplyOutcome({ recorded: false, gate }, "", ` up to date (built at ${provenance.commit.slice(0, 8)}); HEAD moved to ${head.commit.slice(0, 8)} with no code changes, but provenance NOT advanced`);
59228
+ console.log("");
59229
+ continue;
59230
+ }
59231
+ }
59232
+ await recordProvenance(cwd, module, at);
59233
+ console.log(` up to date (built at ${provenance.commit.slice(0, 8)}); no code changed \u2014 provenance advanced to ${head.commit.slice(0, 8)}`);
59234
+ } else if (provenance.commit !== head.commit) {
59235
+ console.log(` up to date (built at ${provenance.commit.slice(0, 8)}); HEAD moved to ${head.commit.slice(0, 8)} with no code changes \u2014 run \`keryx sync --apply\` to advance provenance`);
59236
+ } else {
59237
+ console.log(` up to date (built at ${provenance.commit.slice(0, 8)})`);
59238
+ }
59224
59239
  console.log("");
59225
59240
  continue;
59226
59241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.131",
3
+ "version": "0.2.132",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -128,6 +128,27 @@ export async function checkGraphStaleness(cwd: string): Promise<StalenessCheck>
128
128
  let gitFailed = false;
129
129
 
130
130
  // --- new commit -----------------------------------------------------------
131
+ //
132
+ // Flow 280 (the graph-provenance stall): this comparison is intentionally a
133
+ // bare commit-hash check, and it stays one. The disagreement that flow
134
+ // fixed — a `.metaproject/`-only commit left `keryx sync` saying "nothing
135
+ // to rebuild" while THIS check said "stale" forever, because nothing ever
136
+ // advanced the provenance commit this reads — was not a defect in this
137
+ // comparison. `checkGraphStaleness` has no notion of "since provenance was
138
+ // last recorded" and no per-commit diff to reason from; it only ever sees
139
+ // the two endpoints (`provenance.commit`, `head.commit`). Rederiving "did
140
+ // any code file change between them" here would mean re-running the same
141
+ // diff `../sync/diff.ts` already computes, in a module whose contract is a
142
+ // cheap, dependency-light freshness probe (staleness.test.ts, AFC-10) —
143
+ // and would leave that diff computed twice, once here and once in sync's
144
+ // own loop, with the two free to drift. The fix instead makes the ONE place
145
+ // that already has the diff (`../commands/sync.ts`'s per-module loop)
146
+ // advance provenance to HEAD when that diff is empty, so this check's
147
+ // simple "did the commit move" question starts answering "no" again — which
148
+ // is also why it is correct for this to stay a hard equality check: once
149
+ // provenance is honestly advanced, an ADVANCING mismatch here really does
150
+ // mean the graph predates HEAD, and this is exactly the check the wiki gate
151
+ // (`../wiki/staleness.ts`) needs to keep trusting for that.
131
152
  const head = await gitHead(cwd);
132
153
  if (head === null) {
133
154
  gitFailed = true;