Commit graph

11 commits

Author SHA1 Message Date
Snider
2c18322dfe fix: address CodeRabbit PR #2 findings (batch 2)
- datanode/medium.go: add compile-time Medium interface check
- docs/RFC.md: remove duplicated MemoryMedium Read/Write method entries
- docs/RFC-CORE-008-AGENT-EXPERIENCE.md: add text language tag to fenced code block
- io.go: rename WriteMode param path→filePath to avoid shadowing path package
- io.go: add directory collision check in WriteMode and MemoryWriteCloser.Close
- io.go: Copy now preserves source file permissions via Stat+WriteMode
- node/node.go: add goroutine-safety doc comment on Node
- node/node.go: Rename handles directory prefix batch-rename
- node/node.go: rename CopyFile→ExportFile, document local-only behaviour, wrap PathError with core.E()
- node/node.go: filter empty path components in Walk depth calculation
- node/node_test.go: update tests to use ExportFile
- sigil/crypto_sigil.go: make Key/Obfuscator unexported, add Key()/Obfuscator()/SetObfuscator() accessors
- sigil/crypto_sigil.go: rename receiver sigil→s to avoid shadowing package name
- sigil/crypto_sigil_test.go: update to use accessor methods
- store/medium.go: use KeyValueStore.ListGroups() instead of direct DB query
- store/medium.go: add doc comment that WriteMode does not persist file mode
- store/store.go: add ListGroups() method to KeyValueStore

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 12:39:57 +01:00
Snider
a43a16fb0d fix: address CodeRabbit PR #2 findings
- datanode: add isFileLocked() helper to prevent RLock re-entry deadlock in Append
- io: MemoryMedium WriteMode rejects ancestor-is-file collision; EnsureDir rejects target-is-file collision
- io: copy fileModes during directory rename
- local: guard Delete/DeleteAll against removing sandbox root
- local: add TOCTOU TODO comment on validatePath symlink loop
- local: alias stdlib io→goio in medium_test.go
- datanode: alias stdlib io→goio in medium_test.go
- sqlite: add isValidTableName() whitelist to prevent table-name SQL injection in New()
- sqlite: remove duplicate WHERE clause args in List query
- sqlite: add mode field to sqliteWriteCloser; use it in Close (was hardcoded 420)
- sigil: GzipSigil.In returns nil when custom outputWriter is used (buffer was empty)
- sigil: capture hasher.Write error in HashSigil.In
- sigil: add comment explaining DecryptionFailedError hides raw AEAD error intentionally
- s3: add comment explaining WriteMode ignores mode (no POSIX on S3)
- s3_test: ListObjectsV2 mock sets IsTruncated+NextContinuationToken when maxKeys exceeded
- node: add comment explaining WriteMode ignores mode for in-memory nodes
- store: sort keys before building List entries for deterministic output
- store: add explanatory comment on NotFoundError sentinel
- workspace: replace sha256.Sum256 key derivation with HKDF (RFC 5869)
- docs: fix RFC-CORE-008 header (was RFC-025)
- docs: update import paths from forge.lthn.ai/core/go-io to dappco.re/go/core/io
- docs/RFC.md: remove duplicate Read/Write alias doc blocks

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 12:22:25 +01:00
Virgil
c6adf478d8 refactor(ax): rename nonce helper for clearer naming
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 13:41:04 +00:00
Virgil
50bb356c7c refactor(ax): align remaining AX naming surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 13:35:21 +00:00
Snider
702286a583 feat(ax): apply AX compliance sweep — usage examples and predictable names
Some checks failed
CI / test (push) Failing after 2s
CI / auto-merge (push) Failing after 0s
CI / auto-fix (push) Failing after 0s
- Add // Example: usage comments to all Medium interface methods in io.go
- Add // Example: comments to local, s3, sqlite, store, datanode, node medium methods
- Rename short variable `n` → `nodeTree` throughout node/node_test.go
- Rename short variable `s` → `keyValueStore` in store/store_test.go
- Rename counter variable `n` → `count` in store/store_test.go
- Rename `m` → `medium` in store/medium_test.go helper
- Remove redundant prose comments replaced by usage examples

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 12:19:56 +01:00
Virgil
b3d12ce553 refactor(ax): remove fileget/fileset compatibility aliases
Some checks failed
CI / auto-fix (push) Failing after 0s
CI / test (push) Failing after 2s
CI / auto-merge (push) Failing after 0s
Co-authored-by: Virgil <virgil@lethean.io>
2026-03-31 05:57:21 +00:00
Virgil
32cfabb5e0 refactor(ax): normalize remaining usage examples
Some checks failed
CI / test (push) Failing after 3s
CI / auto-fix (push) Failing after 0s
CI / auto-merge (push) Failing after 1s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:10:35 +00:00
Virgil
347c4b1b57 refactor(ax): trim prose comments to examples
Some checks failed
CI / auto-fix (push) Failing after 0s
CI / test (push) Failing after 2s
CI / auto-merge (push) Failing after 0s
2026-03-30 23:02:53 +00:00
Virgil
f8988c51cb refactor(ax): tighten naming and comment surfaces
Some checks failed
CI / test (push) Failing after 4s
CI / auto-fix (push) Failing after 0s
CI / auto-merge (push) Failing after 0s
2026-03-30 22:56:51 +00:00
Virgil
14418b7782 refactor: tighten AX-facing comments
Some checks failed
CI / test (push) Failing after 2s
CI / auto-fix (push) Failing after 0s
CI / auto-merge (push) Failing after 0s
2026-03-30 22:41:48 +00:00
Virgil
0927aab29d refactor: align AX surfaces and semantic file names 2026-03-30 22:33:03 +00:00
Renamed from datanode/client.go (Browse further)