carlos / platform Public

census: re-propose sqlite-integrity-safe after the R1 fixes

make census-propose NAME=sqlite-integrity-safe with the approved claims
from 3aa2a48, each extended with its R1 change: sourceHeader returns
the journal-mode byte pair (P1-2); inputReader.Read holds an error that
comes with bytes and Decoder.Close returns it first (P1-1). No read
added. RestoreVerify unchanged since the approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 08856d2b5ce40917a6fc0d9d2d1d051a5b515b82 parent 1ea6a14
3 files changed, +11 −11
  • docs/superpowers/notes/census-proposal-sqlite-integrity-safe.md +2 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv +8 −8

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-EJlCJW
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1

amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/notes/census-proposal-sqlite-integrity-safe.md b/docs/superpowers/notes/census-proposal-sqlite-integrity-safe.md
index 3aae05377..6c112764f 100644
--- a/docs/superpowers/notes/census-proposal-sqlite-integrity-safe.md
+++ b/docs/superpowers/notes/census-proposal-sqlite-integrity-safe.md
@@ -5,7 +5,7 @@ Ruling `census-ruling-sqlite-integrity-safe`. The independent reviewer approves
| unit | change | read sites | what changed |
|---|---|---|---|
| `internal/ops/litestream.go` `RestoreVerify` | body | unchanged (1) | Output and counting only: prints restore result and freshness separately and counts current vs could-not-judge; exit status unchanged. No read added or changed; restore call and its one retry unchanged. |
-| `third_party/ltx/decoder.go` `Decoder.Close` | body | unchanged (1) | Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. No read added; same LTX object the restore already opened. |
+| `third_party/ltx/decoder.go` `Decoder.Close` | body | unchanged (1) | Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. Astra R1 P1-1: first returns an error the input already delivered with earlier bytes (held by inputReader) before reading the raw tail. No read added; same LTX object the restore already opened. |
Envelopes re-pinned: `.`, `internal/ops`, `third_party/ltx`.
@@ -21,6 +21,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/ops/freshness.go:sourceHeader`: reads +file:Open; written legacy, accepted-legacy, frozen
- new `third_party/ltx/decoder.go:inputReader.Read`: reads +file:Read ×2; written legacy, accepted-legacy, frozen
-Seal: `dc00dc6bab094e8c81ab4e083a0b6a122ea886a70f8dca4885b5cf8a2bc3b177` → `b0b709d35006d8c1ade021e1d58c8387161479fe1c074a02d9dd1cab565111d6`.
+Seal: `dc00dc6bab094e8c81ab4e083a0b6a122ea886a70f8dca4885b5cf8a2bc3b177` → `c8217bb84289a4773e35a3210fbff98d68f5b78c0f323f9463ef5fe04d04217b`.
Overlay: `internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 494fd1bf1..1fbf9f6ce 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -334,4 +334,4 @@ plan14-root-reads-alias-with-mint-1653.tsv ce9536904e10de3f5e5c582061f130f870515
plan14-root-reads-private-store-scan-1653.tsv ce9536904e10de3f5e5c582061f130f870515ae0999de2946658ea49e4a17bf8
plan14-root-reads-canary-retire-orphan-1634.tsv 83cd5238dcd073e8fc89934a72f9c60b96081f15054f32a168f6cd594c88f49c
plan14-root-reads-backhaul-streams-1535.tsv dc00dc6bab094e8c81ab4e083a0b6a122ea886a70f8dca4885b5cf8a2bc3b177
-plan14-root-reads-sqlite-integrity-safe.tsv b0b709d35006d8c1ade021e1d58c8387161479fe1c074a02d9dd1cab565111d6
+plan14-root-reads-sqlite-integrity-safe.tsv c8217bb84289a4773e35a3210fbff98d68f5b78c0f323f9463ef5fe04d04217b
diff --git a/internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv b/internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv
index 3b371e4e3..88c18acc8 100644
--- a/internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv
+++ b/internal/provision/testdata/plan14-root-reads-sqlite-integrity-safe.tsv
@@ -2,13 +2,13 @@
# 2 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
@legacy c109695ab92e5cc735ade2d02bcd7447f7042dd1ec9bdf3ef3e95eb372776de8 internal/ops/litestream.go RestoreVerify legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sqlite-integrity-safe;basis=Output and counting only: prints restore result and freshness separately and counts current vs could-not-judge; exit status unchanged. No read added or changed; restore call and its one retry unchanged. file:ReadFile@79 6c892a8d1dbcf5b6c6bc00a322e366133c12a24e11ab713065afa5a938907d24
-@legacy a40a02c2dd0d85ece306d2f194e4c53c840448767e2e8e12c69350cd0adb3231 third_party/ltx/decoder.go Decoder.Close legacy accepted-legacy accepted-legacy;rev3=census-ruling-litestream-pin-1443;basis=vendored byte-for-byte from upstream ltx v0.5.1 (until now compiled into root from the module cache, outside the census); no read added or changed. Only acquireReadLock (BeginTx context) and ltx Compactor.Compact (header error returned) differ from upstream (#1443);rev3=census-ruling-sqlite-integrity-safe;basis=Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. No read added; same LTX object the restore already opened. file:ReadAll@516 96ece0fb16711d0734af662cd07573b843caa34587c9bc83bc07e09cc2da051e
-@legacy 669999ee2b7d160232627631c0425a6643574a3f5fcaf320da268241ea8ef68d internal/ops/freshness.go sourceHeader legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New helper replacing the ChangeCounter call in replicaFreshnessCounter: opens the same source path from the generated litestream config and reads the first 28 header bytes (counter plus WAL-mode bytes 18-19) in one read. Same file, same open, no new path. file:Open@82 85e75e33a94f533d2412e25570e5bc4d208451994afb2acc6e7a73fdd9a02fb1
-@legacy e7a953a21f3117bc8d2c9106f897f7123cedce1b00f231a8082d71f3b63ce5cd third_party/ltx/decoder.go inputReader.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New wrapper around the decoder's existing input reader: maps a premature io.EOF to io.ErrUnexpectedEOF unless the decoded zero-page terminator was reached; passes other errors through. Reads only the LTX stream the decoder already reads. file:Read@23,file:Read@64 7bb1baa719abcf75a1cfab2d123b0c0f37a4818c536617e57c2b363afff8298b
+@legacy 6151873a3d72e15537deb1cb1ede8feb04894ce8adec13f42f25e569cbd9e0d7 third_party/ltx/decoder.go Decoder.Close legacy accepted-legacy accepted-legacy;rev3=census-ruling-litestream-pin-1443;basis=vendored byte-for-byte from upstream ltx v0.5.1 (until now compiled into root from the module cache, outside the census); no read added or changed. Only acquireReadLock (BeginTx context) and ltx Compactor.Compact (header error returned) differ from upstream (#1443);rev3=census-ruling-sqlite-integrity-safe;basis=Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. Astra R1 P1-1: first returns an error the input already delivered with earlier bytes (held by inputReader) before reading the raw tail. No read added; same LTX object the restore already opened. file:ReadAll@659 7c3ce9c262deefda32975a406437af5a6ecdd8350ad45cf907d3ed3f2757c163
+@legacy c1b9ece5df9992ac59958b8ca72deb3cad1fd3cfb42b17390cb1c297a242f02c internal/ops/freshness.go sourceHeader legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New helper replacing the ChangeCounter call in replicaFreshnessCounter: opens the same source path from the generated litestream config and reads the first 28 header bytes (counter plus journal-mode bytes 18-19, returned as a pair so only (1,1) earns current, Astra R1 P1-2) in one read. Same file, same open, no new path. file:Open@86 50c340a8a178a71e5fc32c3b4c111cbb1e0cdf0ab0b0a2b632fd9acbca8bbfc9
+@legacy 8a5f8cfe82fc07c56f9162223c22a1cb755bc1c1a60430a38e6a62a7ff237c04 third_party/ltx/decoder.go inputReader.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New wrapper around the decoder input reader: maps a premature io.EOF to io.ErrUnexpectedEOF; passes other errors through, and (Astra R1 P1-1) holds a non-EOF error that arrives with bytes and returns it on every later read so io.ReadFull cannot drop it. Reads only the LTX stream the decoder already reads. file:Read@106,file:Read@23 500600c032b15ebb4b35b2acece650771d1c9331dafb74c75567f16366da9c0b
internal/ops/litestream.go RestoreVerify legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sqlite-integrity-safe;basis=Output and counting only: prints restore result and freshness separately and counts current vs could-not-judge; exit status unchanged. No read added or changed; restore call and its one retry unchanged. file:ReadFile@79 6c892a8d1dbcf5b6c6bc00a322e366133c12a24e11ab713065afa5a938907d24
-third_party/ltx/decoder.go Decoder.Close legacy accepted-legacy accepted-legacy;rev3=census-ruling-litestream-pin-1443;basis=vendored byte-for-byte from upstream ltx v0.5.1 (until now compiled into root from the module cache, outside the census); no read added or changed. Only acquireReadLock (BeginTx context) and ltx Compactor.Compact (header error returned) differ from upstream (#1443);rev3=census-ruling-sqlite-integrity-safe;basis=Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. No read added; same LTX object the restore already opened. file:ReadAll@516 96ece0fb16711d0734af662cd07573b843caa34587c9bc83bc07e09cc2da051e
-internal/ops/freshness.go sourceHeader legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New helper replacing the ChangeCounter call in replicaFreshnessCounter: opens the same source path from the generated litestream config and reads the first 28 header bytes (counter plus WAL-mode bytes 18-19) in one read. Same file, same open, no new path. file:Open@82 85e75e33a94f533d2412e25570e5bc4d208451994afb2acc6e7a73fdd9a02fb1
-third_party/ltx/decoder.go inputReader.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New wrapper around the decoder's existing input reader: maps a premature io.EOF to io.ErrUnexpectedEOF unless the decoded zero-page terminator was reached; passes other errors through. Reads only the LTX stream the decoder already reads. file:Read@23,file:Read@64 7bb1baa719abcf75a1cfab2d123b0c0f37a4818c536617e57c2b363afff8298b
+third_party/ltx/decoder.go Decoder.Close legacy accepted-legacy accepted-legacy;rev3=census-ruling-litestream-pin-1443;basis=vendored byte-for-byte from upstream ltx v0.5.1 (until now compiled into root from the module cache, outside the census); no read added or changed. Only acquireReadLock (BeginTx context) and ltx Compactor.Compact (header error returned) differ from upstream (#1443);rev3=census-ruling-sqlite-integrity-safe;basis=Reads through inputReader; a tail shorter than 8 bytes returns io.ErrUnexpectedEOF instead of panicking on a negative slice bound; lz4 end-frame error keeps its cause. Astra R1 P1-1: first returns an error the input already delivered with earlier bytes (held by inputReader) before reading the raw tail. No read added; same LTX object the restore already opened. file:ReadAll@659 7c3ce9c262deefda32975a406437af5a6ecdd8350ad45cf907d3ed3f2757c163
+internal/ops/freshness.go sourceHeader legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New helper replacing the ChangeCounter call in replicaFreshnessCounter: opens the same source path from the generated litestream config and reads the first 28 header bytes (counter plus journal-mode bytes 18-19, returned as a pair so only (1,1) earns current, Astra R1 P1-2) in one read. Same file, same open, no new path. file:Open@86 50c340a8a178a71e5fc32c3b4c111cbb1e0cdf0ab0b0a2b632fd9acbca8bbfc9
+third_party/ltx/decoder.go inputReader.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-sqlite-integrity-safe;basis=New wrapper around the decoder input reader: maps a premature io.EOF to io.ErrUnexpectedEOF; passes other errors through, and (Astra R1 P1-1) holds a non-EOF error that arrives with bytes and returns it on every later read so io.ReadFull cannot drop it. Reads only the LTX stream the decoder already reads. file:Read@106,file:Read@23 500600c032b15ebb4b35b2acece650771d1c9331dafb74c75567f16366da9c0b
@coverage . 66d3445f86ea99dd88e2209717e7f0c357e1507923b07426993c10b6cf8df03e
-@coverage internal/ops fec19eaf2786925518f2bc78997b61a6753388049837e7db04cfafba557a2665
-@coverage third_party/ltx c9722f3e80379a8d8fb86b9a8061849e748e5d6dc537d8927ed3daa9ccc8bc2b
+@coverage internal/ops 42c990c49025533b34592b73cf4276c914ec8cda4f972b910751d7d7d7aedbc0
+@coverage third_party/ltx 5fafd968d55daccc9eae9caca02579ffb81693125f5305f62c1cedbd7def1659