kairos-chain 3.58.1 → 3.58.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/lib/kairos_mcp/tools/system_upgrade.rb +13 -5
- data/lib/kairos_mcp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 354e0a87d4c0ed3736972c2fde97cf1537b4054d6ab86ae3cdf593e2c6d08a76
|
|
4
|
+
data.tar.gz: 64237a0328caa2330bbebd4e188c017fc076bc773a9e0a4bcf05ea3fe8e9b118
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bde4d816b2a7610de034633ae467c1f6febda1b907b81fb156b356b5d86980f57c37c3e8903cdeb24a861323d16705a1d167e63390d9c1350d8bb880fb52f3da
|
|
7
|
+
data.tar.gz: 9e32311add613a1bbddffa704f0720622ca436be7a0bfc56b237d3ac650cf574cdb82ed3f12550e94782020c1b4c762baa6333db8b72a1ea04f32bf46a37cc8e
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ All notable changes to the `kairos-chain` gem will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project follows [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [3.58.2] - 2026-08-03
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`system_upgrade` no longer reverts user-modified L0 templates.**
|
|
12
|
+
`.kairos_meta.yml`'s `template_hashes` and `knowledge_hashes` are the common
|
|
13
|
+
ancestor of `UpgradeAnalyzer`'s three-way comparison: for each file they must
|
|
14
|
+
record the gem template the instance's copy descends from. `Initializer#write_meta`
|
|
15
|
+
has always hashed the template; `SystemUpgrade#update_meta` rebuilt the same
|
|
16
|
+
baseline from the *instance's own file* at the end of every `upgrade --apply`.
|
|
17
|
+
The ancestor therefore collapsed onto one side, `user_modified` was necessarily
|
|
18
|
+
false on the following upgrade, and a user-edited file whose template differed
|
|
19
|
+
was classified `auto_updatable` and overwritten without a chain record.
|
|
20
|
+
- Observed as `skills/config.yml` reverting `instructions_mode` from a
|
|
21
|
+
user-selected mode to the template default, five times between 2026-06-09
|
|
22
|
+
and 2026-08-03. The first occurrence went unnoticed for three weeks.
|
|
23
|
+
- The trigger is *the previous upgrade reported `[KEPT]`*, which is why it
|
|
24
|
+
looked intermittent: a protected run is what armed the next one.
|
|
25
|
+
- All eight `KairosMcp::TEMPLATE_FILES` entries took this path, `config/safety.yml`
|
|
26
|
+
included. The L1 `knowledge_hashes` writer carried the identical defect and is
|
|
27
|
+
fixed in the same change.
|
|
28
|
+
- An instance whose stored baseline already points at its own file takes at most
|
|
29
|
+
one more wrong overwrite after upgrading to this version, then stabilises. No
|
|
30
|
+
migration step is shipped.
|
|
31
|
+
- Regression covered by `test_upgrade_meta_baseline.rb` (6 tests), which drives
|
|
32
|
+
the real `Initializer`, `update_meta`, and `UpgradeAnalyzer` over repeated
|
|
33
|
+
upgrade cycles rather than re-implementing the classification. Added to
|
|
34
|
+
`rake test_all`.
|
|
35
|
+
|
|
7
36
|
## [3.56.0] - 2026-07-31
|
|
8
37
|
|
|
9
38
|
### Changed
|
|
@@ -738,20 +738,28 @@ module KairosMcp
|
|
|
738
738
|
meta['template_hashes'] = {}
|
|
739
739
|
meta['knowledge_hashes'] = {}
|
|
740
740
|
|
|
741
|
-
# Record
|
|
742
|
-
|
|
743
|
-
|
|
741
|
+
# Record the gem template each L0 file now descends from.
|
|
742
|
+
#
|
|
743
|
+
# These hashes are the common ancestor of UpgradeAnalyzer's three-way
|
|
744
|
+
# comparison, so they must come from the template side. Hashing the
|
|
745
|
+
# user's own file here collapses the ancestor onto one side: on the next
|
|
746
|
+
# upgrade `user_modified` is necessarily false, and a user-modified file
|
|
747
|
+
# is classified auto_updatable and overwritten. Mirrors
|
|
748
|
+
# Initializer#write_meta, which has always hashed the template.
|
|
749
|
+
KairosMcp::TEMPLATE_FILES.each do |template_name, _accessor|
|
|
750
|
+
path = File.join(KairosMcp.templates_dir, template_name)
|
|
744
751
|
if File.exist?(path)
|
|
745
752
|
meta['template_hashes'][template_name] =
|
|
746
753
|
"sha256:#{Digest::SHA256.file(path).hexdigest}"
|
|
747
754
|
end
|
|
748
755
|
end
|
|
749
756
|
|
|
750
|
-
# Record
|
|
757
|
+
# Record L1 knowledge templates (hash the main .md file). Same ancestor
|
|
758
|
+
# rule as above — the template side, not the user's copy.
|
|
751
759
|
knowledge_templates_dir = File.join(KairosMcp.templates_dir, 'knowledge')
|
|
752
760
|
if File.directory?(knowledge_templates_dir)
|
|
753
761
|
Dir.children(knowledge_templates_dir).sort.each do |name|
|
|
754
|
-
md_path = File.join(
|
|
762
|
+
md_path = File.join(knowledge_templates_dir, name, "#{name}.md")
|
|
755
763
|
if File.exist?(md_path)
|
|
756
764
|
meta['knowledge_hashes'][name] =
|
|
757
765
|
"sha256:#{Digest::SHA256.file(md_path).hexdigest}"
|
data/lib/kairos_mcp/version.rb
CHANGED