1. Filesystem type detection (architect P2 finding)
_primitives/_rust/keisei/src/fs_type.rs (NEW, 103 LOC)
- statfs(2)-based detection on unix (libc = '0.2' under
[target.'cfg(unix)'.dependencies])
- Recognizes exfat / msdos (FAT32) via f_fstypename on macOS,
via f_type magic numbers on Linux (0x4d44, 0x2011bab0)
- Windows stub returns Unknown (GetVolumeInformationW TBD)
- warn_on_unsafe_fs(root) emits stderr warning on ExFat/Fat32
brain.rs::load calls warn_on_unsafe_fs after canonicalize+symlink
checks. Warning NOT fatal — user can opt into single-client use.
2. Battle-test matrix (architect P3 finding)
tests/battle/Dockerfile.install-test-alpine (NEW)
- alpine:3.19 + apk rust/cargo/pandoc
- Exposes musl-vs-glibc issues in aws-sdk-s3, rusqlite, git2
tests/battle/Dockerfile.install-test-debian (NEW)
- debian:12 + rustup stable + pandoc
- Default server distro, different apt structure from Ubuntu
tests/battle/README.md rewritten — 3-distro matrix with run script
3. USB-BRAIN-GUIDE platform split
docs/USB-BRAIN-GUIDE.md — restructured as TOC + platform-agnostic
preamble + exFAT warning + cross-platform troubleshooting
docs/USB-BRAIN-GUIDE-macos.md (NEW, 97 LOC) — Gatekeeper, diskutil,
/Volumes, xattr -d com.apple.quarantine
docs/USB-BRAIN-GUIDE-linux.md (NEW, 98 LOC) — /media/$USER,
umount, ext4 recommended, systemd-udev auto-mount note
docs/USB-BRAIN-GUIDE-windows.md (NEW, 115 LOC) — PowerShell
Dismount-Volume, NTFS, FS-advisory Unknown caveat
REAL VERIFICATION (paste from agent):
cargo check -p keisei: Finished (clean)
cargo test -p keisei --release: 32 passed 0 failed (30 existing + 2 new)
docker buildx outline: both new Dockerfiles parse
Constructor Pattern:
fs_type.rs 103 LOC, brain.rs 198 LOC (at limit 200, held the line)
All fns <30 LOC. Each USB guide sub-doc 97-115 LOC.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
1.5 KiB
Text
42 lines
1.5 KiB
Text
# tests/battle/Dockerfile.install-test-alpine
|
|
# Alpine 3.19 — musl libc. Common container base; exposes musl-vs-glibc
|
|
# compatibility for rusqlite, git2, aws-sdk-s3 (all include C code).
|
|
#
|
|
# Build from repo root:
|
|
# docker build -t keisei-battle-alpine:latest -f tests/battle/Dockerfile.install-test-alpine .
|
|
# Run (default: minimal profile):
|
|
# docker run --rm keisei-battle-alpine:latest
|
|
# Override:
|
|
# docker run --rm -e PROFILE=full keisei-battle-alpine:latest
|
|
#
|
|
# Known-issue: aws-sdk-s3 / rusqlite / git2 may fail to static-link on
|
|
# musl. That IS what this matrix catches. Treat such failures as
|
|
# "known-issue on musl", not as a blocker for this image.
|
|
|
|
FROM alpine:3.19
|
|
|
|
ENV LANG=C.UTF-8 \
|
|
LC_ALL=C.UTF-8 \
|
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
# Baseline deps — jq (HARD prereq), pandoc (soft), git/curl/ca-certs
|
|
# (kit + optional rustup), build-base (cc/ld), rust+cargo (distro pkg —
|
|
# Alpine 3.19 ships 1.76; edition = "2024" (1.85+) crates may fail, that
|
|
# failure is part of the test surface).
|
|
RUN apk add --no-cache \
|
|
bash curl ca-certificates git build-base \
|
|
jq pandoc \
|
|
rust cargo
|
|
|
|
WORKDIR /opt/keiseikit
|
|
COPY . /opt/keiseikit/
|
|
|
|
COPY tests/battle/verify.sh /usr/local/bin/verify.sh
|
|
COPY tests/battle/battle-entry.sh /usr/local/bin/battle-entry.sh
|
|
|
|
RUN chmod +x /usr/local/bin/verify.sh \
|
|
/usr/local/bin/battle-entry.sh \
|
|
/opt/keiseikit/install.sh
|
|
|
|
ENV PROFILE=minimal
|
|
ENTRYPOINT ["/usr/local/bin/battle-entry.sh"]
|