skillwiki 0.10.84 → 0.10.85
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.
|
@@ -482,12 +482,16 @@ snapshot_freeze_projection_expectations() {
|
|
|
482
482
|
return 1
|
|
483
483
|
fi
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
PROJECTION_EXPECTED_LOG_SHA256="$(snapshot_projection_hash_file "$PROJECTION_STATE_DIR/expected-log.md")" || return 1
|
|
485
|
+
snapshot_record_projection_expectation_hashes || return 1
|
|
487
486
|
log "projection expected bytes frozen index_sha256=$PROJECTION_EXPECTED_INDEX_SHA256 log_sha256=$PROJECTION_EXPECTED_LOG_SHA256"
|
|
488
487
|
return 0
|
|
489
488
|
}
|
|
490
489
|
|
|
490
|
+
snapshot_record_projection_expectation_hashes() {
|
|
491
|
+
PROJECTION_EXPECTED_INDEX_SHA256="$(snapshot_projection_hash_file "$PROJECTION_STATE_DIR/expected-index.md")" || return 1
|
|
492
|
+
PROJECTION_EXPECTED_LOG_SHA256="$(snapshot_projection_hash_file "$PROJECTION_STATE_DIR/expected-log.md")" || return 1
|
|
493
|
+
}
|
|
494
|
+
|
|
491
495
|
snapshot_live_projection_matches_frozen() {
|
|
492
496
|
local live_index_sha live_log_sha
|
|
493
497
|
if ! cmp -s "$PROJECTION_STATE_DIR/expected-index.md" "$WIKI_DIR/index.md" \
|
|
@@ -558,6 +562,51 @@ snapshot_wait_for_direct_projection_parity() {
|
|
|
558
562
|
done
|
|
559
563
|
}
|
|
560
564
|
|
|
565
|
+
snapshot_refresh_projection_expectations_from_store() {
|
|
566
|
+
if [ -z "$PROJECTION_STATE_DIR" ]; then
|
|
567
|
+
return 0
|
|
568
|
+
fi
|
|
569
|
+
|
|
570
|
+
local index_pid log_pid index_rc log_rc
|
|
571
|
+
timeout "$PROJECTION_READ_TIMEOUT_SECONDS" \
|
|
572
|
+
rclone cat "${CLOUD_REMOTE%/}/index.md" --retries 1 \
|
|
573
|
+
>"$PROJECTION_STATE_DIR/expected-index.md" 2>>"$LOG_FILE" &
|
|
574
|
+
index_pid=$!
|
|
575
|
+
timeout "$PROJECTION_READ_TIMEOUT_SECONDS" \
|
|
576
|
+
rclone cat "${CLOUD_REMOTE%/}/log.md" --retries 1 \
|
|
577
|
+
>"$PROJECTION_STATE_DIR/expected-log.md" 2>>"$LOG_FILE" &
|
|
578
|
+
log_pid=$!
|
|
579
|
+
wait "$index_pid"
|
|
580
|
+
index_rc=$?
|
|
581
|
+
wait "$log_pid"
|
|
582
|
+
log_rc=$?
|
|
583
|
+
if [ "$index_rc" -ne 0 ]; then
|
|
584
|
+
log "ERROR: could not read current store index.md after sync"
|
|
585
|
+
return 1
|
|
586
|
+
fi
|
|
587
|
+
if [ "$log_rc" -ne 0 ]; then
|
|
588
|
+
log "ERROR: could not read current store log.md after sync"
|
|
589
|
+
return 1
|
|
590
|
+
fi
|
|
591
|
+
snapshot_record_projection_expectation_hashes || return 1
|
|
592
|
+
log "projection expectations refreshed from store after sync expected_index_sha256=$PROJECTION_EXPECTED_INDEX_SHA256 expected_log_sha256=$PROJECTION_EXPECTED_LOG_SHA256"
|
|
593
|
+
return 0
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
snapshot_gate_projection_candidate() {
|
|
597
|
+
local refresh_fail="$1"
|
|
598
|
+
local verify_fail="$2"
|
|
599
|
+
if ! snapshot_refresh_projection_expectations_from_store; then
|
|
600
|
+
log "$refresh_fail"
|
|
601
|
+
return 1
|
|
602
|
+
fi
|
|
603
|
+
if ! snapshot_verify_projection_candidate; then
|
|
604
|
+
log "$verify_fail"
|
|
605
|
+
return 1
|
|
606
|
+
fi
|
|
607
|
+
return 0
|
|
608
|
+
}
|
|
609
|
+
|
|
561
610
|
snapshot_verify_worktree_projection_parity() {
|
|
562
611
|
if [ -z "$PROJECTION_STATE_DIR" ]; then
|
|
563
612
|
return 0
|
|
@@ -1014,8 +1063,9 @@ snapshot_reconcile_delete_intents() {
|
|
|
1014
1063
|
if ! snapshot_reconcile_delete_intents; then
|
|
1015
1064
|
exit 1
|
|
1016
1065
|
fi
|
|
1017
|
-
if !
|
|
1018
|
-
|
|
1066
|
+
if ! snapshot_gate_projection_candidate \
|
|
1067
|
+
"FAIL projection expectation refresh after sync; snapshot promotion refused" \
|
|
1068
|
+
"FAIL projection candidate verification; snapshot promotion refused"; then
|
|
1019
1069
|
exit 1
|
|
1020
1070
|
fi
|
|
1021
1071
|
|
|
@@ -1088,8 +1138,9 @@ if [ "$needs_repair" = true ]; then
|
|
|
1088
1138
|
if ! snapshot_reconcile_delete_intents; then
|
|
1089
1139
|
exit 1
|
|
1090
1140
|
fi
|
|
1091
|
-
if !
|
|
1092
|
-
|
|
1141
|
+
if ! snapshot_gate_projection_candidate \
|
|
1142
|
+
"FAIL post-repair projection expectation refresh after sync; snapshot promotion refused" \
|
|
1143
|
+
"FAIL post-repair projection candidate verification; snapshot promotion refused"; then
|
|
1093
1144
|
exit 1
|
|
1094
1145
|
fi
|
|
1095
1146
|
if ! snapshot_freeze_git_receipt; then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.85",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.85",
|
|
4
4
|
"description": "Project-aware Karpathy-style knowledge base: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by HTTP MCP wiki_capture.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "karlorz"
|