pumuki 6.3.167 → 6.3.168

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/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [6.3.168] - 2026-05-06
10
+
11
+ ### Fixed
12
+
13
+ - **Tracked evidence commit hygiene:** `pumuki-pre-commit` now respects tracked `.ai_evidence.json` when it was not staged by the developer before a successful code commit. Documentation-only commits still restore evidence drift, and `PUMUKI_PRE_COMMIT_ALWAYS_RESTAGE_TRACKED_EVIDENCE=1` preserves the previous forced restage behavior.
14
+
9
15
  ## [6.3.167] - 2026-05-06
10
16
 
11
17
  ### Fixed
@@ -77,6 +77,9 @@ const shouldSkipRestagingTrackedEvidenceForDocumentationOnlyScope = (params: {
77
77
  return paths.every(isDocumentationOnlyStagedPath);
78
78
  };
79
79
 
80
+ const hasStagedEvidencePath = (paths: ReadonlyArray<string>): boolean =>
81
+ paths.some((path) => path === '.ai_evidence.json' || path === '.AI_EVIDENCE.json');
82
+
80
83
  const PRE_COMMIT_EVIDENCE_MAX_AGE_SECONDS = 900;
81
84
  const PRE_PUSH_EVIDENCE_MAX_AGE_SECONDS = 1800;
82
85
  const HOOK_GATE_PROGRESS_REMINDER_MS = 2000;
@@ -520,6 +523,7 @@ const syncTrackedEvidenceAfterSuccessfulPreCommit = (params: {
520
523
  dependencies: StageRunnerDependencies;
521
524
  repoRoot: string;
522
525
  gateBlocked: boolean;
526
+ evidenceWasStagedAtStart: boolean;
523
527
  }): boolean => {
524
528
  const evidenceAbsolutePath = join(params.repoRoot, EVIDENCE_FILE_PATH);
525
529
  if (!existsSync(evidenceAbsolutePath)) {
@@ -543,6 +547,19 @@ const syncTrackedEvidenceAfterSuccessfulPreCommit = (params: {
543
547
  params.dependencies.restorePathFromHead(params.repoRoot, EVIDENCE_FILE_PATH);
544
548
  return false;
545
549
  }
550
+ if (
551
+ !params.gateBlocked &&
552
+ !params.evidenceWasStagedAtStart &&
553
+ !isTruthyEnvFlag(process.env.PUMUKI_PRE_COMMIT_ALWAYS_RESTAGE_TRACKED_EVIDENCE)
554
+ ) {
555
+ if (!params.dependencies.isQuietMode()) {
556
+ process.stderr.write(
557
+ `[pumuki][evidence-sync] tracked ${EVIDENCE_FILE_PATH} left unstaged because it was not staged before PRE_COMMIT. ` +
558
+ `Force previous behavior: PUMUKI_PRE_COMMIT_ALWAYS_RESTAGE_TRACKED_EVIDENCE=1\n`
559
+ );
560
+ }
561
+ return false;
562
+ }
546
563
  try {
547
564
  params.dependencies.stagePath(params.repoRoot, EVIDENCE_FILE_PATH);
548
565
  return false;
@@ -787,6 +804,7 @@ export async function runPreCommitStage(
787
804
  const activeDependencies = getDependencies(dependencies);
788
805
  const repoRoot = activeDependencies.resolveRepoRoot();
789
806
  const manifestSnapshot = captureManifestGuardSnapshot(repoRoot);
807
+ const initiallyStagedPaths = activeDependencies.listStagedIndexPaths(repoRoot);
790
808
  activeDependencies.ensureRuntimeArtifactsIgnored(repoRoot);
791
809
  if (
792
810
  enforceGitAtomicityGate({
@@ -820,6 +838,7 @@ export async function runPreCommitStage(
820
838
  dependencies: activeDependencies,
821
839
  repoRoot,
822
840
  gateBlocked: result.exitCode !== 0,
841
+ evidenceWasStagedAtStart: hasStagedEvidencePath(initiallyStagedPaths),
823
842
  })
824
843
  ) {
825
844
  return 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.167",
3
+ "version": "6.3.168",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {