@christang/keel 5.153.0 → 5.154.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.153.0",
3
+ "version": "5.154.0",
4
4
  "description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
5
5
  "author": {
6
6
  "name": "TanglmChris",
@@ -1,4 +1,4 @@
1
- <!-- keel:start version=5.153.0 -->
1
+ <!-- keel:start version=5.154.0 -->
2
2
  ## Keel Bootstrap
3
3
 
4
4
  - Start every session with `keel context`; OpenSpec artifacts and Git are the only durable authority — never native memory, goals, or transcripts.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@christang/keel",
3
- "version": "5.153.0",
3
+ "version": "5.154.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@christang/keel",
9
- "version": "5.153.0",
9
+ "version": "5.154.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@fission-ai/openspec": "^1.4.1"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@christang/keel",
3
3
  "displayName": "Keel",
4
4
  "description": "Keel OpenSpec execution discipline CLI for Claude Code, Codex, and OpenCode.",
5
- "version": "5.153.0",
5
+ "version": "5.154.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.153.0",
3
+ "version": "5.154.0",
4
4
  "description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
5
5
  "author": {
6
6
  "name": "TanglmChris",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.153.0",
3
+ "version": "5.154.0",
4
4
  "description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
5
5
  "author": {
6
6
  "name": "TanglmChris",
@@ -49,8 +49,8 @@ REQUIRED_SCRIPTS = [
49
49
  "scripts/validate_plugin.py",
50
50
  ]
51
51
 
52
- PACKAGE_VERSION = "5.153.0"
53
- PROTOCOL_VERSION = "5.153.0"
52
+ PACKAGE_VERSION = "5.154.0"
53
+ PROTOCOL_VERSION = "5.154.0"
54
54
  LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
55
55
  OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
56
56
  # Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
@@ -6244,6 +6244,25 @@ def validate_shift_resume_checks_commits_scenario() -> int:
6244
6244
  if line_for("20261018"):
6245
6245
  report(f"{label} a date was read as a commit id: {resumed.stdout!r}")
6246
6246
  return 1
6247
+
6248
+ # A short sha can be all digits (about 2% of them): one named after `@`,
6249
+ # or one that resolves to a commit, is still a commit id.
6250
+ digits, n = "", 0
6251
+ while not digits:
6252
+ n += 1
6253
+ candidate = git("commit-tree", tree, "-p", landed, "-m", f"digits {n}")
6254
+ if candidate[:8].isdigit():
6255
+ digits = candidate
6256
+ git("push", "-q", "origin", f"{digits}:refs/heads/digits-branch")
6257
+ run_keel(verify, "shift", "ready", f"digits-branch @ {digits[:8]} is the tip. Also see {digits[:8]}.", env=env)
6258
+ again = run_keel(verify, "shift", "resume", env=env).stdout.splitlines()
6259
+ pair = next((l for l in again if l.startswith(f"- digits-branch @ {digits[:8]}")), "")
6260
+ if "current" not in pair:
6261
+ report(f"{label} an all-digit sha after `@` is not marked current: {pair!r} in {again!r}")
6262
+ return 1
6263
+ if not any(l.startswith(f"- {digits[:8]}:") for l in again):
6264
+ report(f"{label} an all-digit sha that resolves to a commit is not listed: {again!r}")
6265
+ return 1
6247
6266
  if "not fetched" not in resumed.stdout:
6248
6267
  report(f"{label} the check does not say it did not fetch: {resumed.stdout!r}")
6249
6268
  return 1
package/src/core/shift.js CHANGED
@@ -594,13 +594,18 @@ function remoteDefault(cwd) {
594
594
  function noteCommits(cwd, text) {
595
595
  const seen = new Set();
596
596
  const named = [];
597
+ // After `@` the pair already says it is a commit, so an all-digit sha counts
598
+ // (about 2% of short shas are all digits).
597
599
  for (const match of String(text).matchAll(NOTE_PAIR)) {
598
- if (!looksLikeSha(match[2])) continue;
599
600
  named.push({ index: match.index, branch: match[1], sha: match[2], token: `${match[1]} @ ${match[2]}` });
600
601
  seen.add(match.index + match[0].length - match[2].length);
601
602
  }
602
603
  for (const match of String(text).matchAll(NOTE_SHA)) {
603
- if (!looksLikeSha(match[1]) || seen.has(match.index)) continue;
604
+ if (seen.has(match.index)) continue;
605
+ // A bare token needs a letter and a digit, or, when it is all digits, to
606
+ // resolve to a commit, so a date does not count.
607
+ const allDigits = /^\d+$/.test(match[1]);
608
+ if (allDigits ? !git(cwd, ["rev-parse", "--verify", "--quiet", `${match[1]}^{commit}`]).ok : !looksLikeSha(match[1])) continue;
604
609
  named.push({ index: match.index, branch: null, sha: match[1], token: match[1] });
605
610
  }
606
611
  named.sort((a, b) => a.index - b.index);