mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-10-19 14:07:36 +02:00
The review found two failure paths that reported success for work the engine had not done. Rollback: it refused only when *non-protected* source files were modified, and then ran `git reset --hard` to the previous commit - which discards every local change to tracked files, not just the update's. Edits to roles/skills/tools (the update itself keeps those via its own stash) and edits made after the update were silently wiped, while Result said nothing: deployment.md's promise that "work done afterwards is not swept away" did not hold. Rollback now copies every protected file that differs right now into `.update-backup/rollback_<ts>/` before the reset, sets the copies back after it, re-applies hand deletions, and names what it kept in Result.KeptContent like an update does. Retry: Apply merges and writes the state file before it builds, so a failed (or toolchain-less) build leaves HEAD on the new commit with the old binary still in place. The retry then took the `!snap.UpdateAvailable` no-op branch, aligned the version and returned err=nil - the job was recorded as succeeded, the page said "update finished", the CLI printed that source and binary were in place, and the old executable kept running. The tree now carries a `.update-build-pending` marker, written the moment the merge lands (and when an adoption commits to its work tree) and cleared only after the new binary is in place. The no-op branch reads it: with a toolchain it compiles and reports the build (commits=0, binaryBuilt=true); without one it keeps refusing exactly like the first attempt, so "install go and click again" is now a real instruction. The console stops treating "nothing to pull" as "nothing to do" (the retry button stays live, the confirm dialog and the done toast say the build is what will happen), and the CLI's printResult no longer swallows the build-only result. Both paths are covered by regression tests that fail on the pre-fix tree: two rollback scenarios driven through real git (edit before and after the update, a hand deletion), and four retry scenarios driven through a scripted go on PATH (failed build, state-write failure, an adoption's failed build retried by the next update, and no toolchain then toolchain).
76 lines
903 B
Plaintext
76 lines
903 B
Plaintext
# Runtime data
|
|
data/
|
|
chat_uploads/
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|
|
*.db-journal
|
|
*.sqlite
|
|
*.sqlite3
|
|
|
|
# Local configuration and secrets
|
|
config.yaml
|
|
config.local.yaml
|
|
config.yaml.backup
|
|
*.backup
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
*.pem
|
|
*.key
|
|
*.crt
|
|
|
|
# Upgrade / settings backups
|
|
.upgrade-backup/
|
|
|
|
# Eino runtime task board (under skills_dir)
|
|
skills/.eino/
|
|
|
|
# Build outputs
|
|
cyberstrike-ai
|
|
cyberstrike-ai.exe
|
|
*.test
|
|
bin/
|
|
dist/
|
|
build/
|
|
.build/
|
|
target/
|
|
.gradle/
|
|
coverage.out
|
|
coverage.html
|
|
|
|
# One-click update artifacts (internal/update): machine-local, written at the install root
|
|
.update-staging/
|
|
.update-backup/
|
|
.update-state.json
|
|
.update-build-pending
|
|
cyberstrike-ai.prev
|
|
|
|
# Logs and temporary files
|
|
/log/
|
|
*.log
|
|
*.bak
|
|
*~
|
|
tmp/
|
|
temp/
|
|
|
|
# Python
|
|
venv/
|
|
.venv/
|
|
__pycache__/
|
|
*.py[cod]
|
|
.pytest_cache/
|
|
|
|
# Go
|
|
/vendor/
|
|
|
|
# Node / browser extension
|
|
node_modules/
|
|
|
|
# macOS / Windows / editors
|
|
.DS_Store
|
|
Thumbs.db
|
|
desktop.ini
|
|
.idea/
|
|
.vscode/
|