Commit Graph
140 Commits
Author SHA1 Message Date
Ed1s0nZ 7f8dab4ec9 feat: reconcile SQLite tables and columns at startup 2026-10-10 20:45:39 +08:00
Ed1s0nZ 8cc575b6ae docs: plan SQLite startup reconciliation implementation 2026-10-10 20:37:28 +08:00
Ed1s0nZ 1d73bb944d docs: design SQLite schema reconciliation 2026-10-10 20:37:12 +08:00
Ed1s0nZ ceaf63afc5 docs: confirm startup schema reconciliation requirements 2026-10-10 20:36:49 +08:00
Ed1s0nZ a7b3bec3ee docs: record startup schema reconciliation intake 2026-10-10 20:32:11 +08:00
Ed1s0nZ 78d8862979 docs: record verified main integration of REST semantics fix 2026-10-10 18:43:37 +08:00
Ed1s0nZ 3da1d22b76 docs: add REST semantics fix release record 2026-10-10 18:03:12 +08:00
Ed1s0nZ b1124fbe1e docs: record REST semantics verification and API contract 2026-10-10 18:02:52 +08:00
Ed1s0nZ 9f111a1389 fix: normalize missing deletes and empty REST lists 2026-10-10 18:02:02 +08:00
Ed1s0nZ f201397796 docs: plan REST contract regression coverage 2026-10-10 18:00:02 +08:00
Ed1s0nZ c629b08b0d docs: define REST response semantics 2026-10-10 17:59:52 +08:00
Ed1s0nZ b2b76b7193 docs: confirm REST error and empty-list requirements 2026-10-10 17:59:32 +08:00
Ed1s0nZ 35955e4740 docs: record REST semantics fix intake 2026-10-10 17:59:13 +08:00
Ed1s0nZ 68df7c1aff docs: record PR 351 review and merge to main 2026-10-10 17:35:53 +08:00
Ed1s0nZ 5d44b59c2f docs: link interception conflict fix pull request 2026-10-10 17:19:54 +08:00
Ed1s0nZ 8477bfcc74 docs: finalize interception conflict fix review record 2026-10-10 17:19:28 +08:00
Ed1s0nZ 7302c3d822 docs: record interception conflict fix verification 2026-10-10 17:18:51 +08:00
Ed1s0nZ 1ecbd4054c fix: reject stale concurrent interception rule saves 2026-10-10 17:18:13 +08:00
Ed1s0nZ 4a1d0e114e docs: plan interception conflict fix validation 2026-10-10 17:15:05 +08:00
Ed1s0nZ 23034ffa45 docs: design interception optimistic concurrency contract 2026-10-10 17:14:48 +08:00
Ed1s0nZ 7e6feeb96b docs: record authorized conflict protection requirements 2026-10-10 17:14:29 +08:00
Ed1s0nZ 65f947c9df docs: record interception conflict fix intake 2026-10-10 17:14:13 +08:00
Ed1s0nZ a8321c4bff fix(vulnerability): allow standalone manual findings and validate links 2026-10-10 16:03:42 +08:00
Ed1s0nZ 088d6da3c1 fix(rbac): revoke only affected role sessions 2026-10-10 15:42:42 +08:00
Ed1s0nZ 9e7eb2db5f docs: record Russian layout fix merge to main 2026-10-10 13:45:10 +08:00
Ed1s0nZ ab04c86459 docs: add Russian layout fix release record 2026-10-10 13:41:29 +08:00
Ed1s0nZ 6626a820d4 docs: record multilingual layout verification 2026-10-10 13:41:27 +08:00
Ed1s0nZ 132babe3a9 fix: prevent long localized dashboard labels from overflowing 2026-10-10 13:41:00 +08:00
Ed1s0nZ f6f93a1b9f docs: plan Russian overflow fix and visual checks 2026-10-10 13:37:07 +08:00
Ed1s0nZ 3889de4693 docs: design content-aware dashboard layout 2026-10-10 13:37:05 +08:00
Ed1s0nZ c356e51418 docs: define layout overflow acceptance criteria 2026-10-10 13:36:45 +08:00
Ed1s0nZ e82ee59fbb docs: record Russian layout fix intake 2026-10-10 13:36:31 +08:00
Ed1s0nZ c215312485 docs: record corrective review and unreleased fixes 2026-10-09 14:16:23 +08:00
Ed1s0nZ 0283774799 docs: record corrective verification and recovery compatibility 2026-10-09 14:16:04 +08:00
Ed1s0nZ ff50af028f fix: keep MCP activation flags consistent across start and stop 2026-10-09 14:15:24 +08:00
Ed1s0nZ fab7e60318 fix: preserve MCP stop state and validate recovery evidence before mutation 2026-10-09 14:12:27 +08:00
Ed1s0nZ 7f5a088c61 docs: plan recovery and MCP corrective tests 2026-10-09 14:03:48 +08:00
Ed1s0nZ 54b87185e2 docs: design fail-closed recovery evidence validation 2026-10-09 14:03:40 +08:00
Ed1s0nZ 61d456c804 docs: define recovery and MCP regression acceptance 2026-10-09 14:02:46 +08:00
Ed1s0nZ 8900431bac docs: record post-merge recovery fix scope 2026-10-09 14:02:31 +08:00
Sycun a63070dbd7 docs: explain update locking and interrupted rollback recovery 2026-10-09 11:10:24 +08:00
Sycun b645914e1f fix: a rollback keeps a recreated role, and an owed build is finished first
Three ways the installation could still end up with its source, its binary and
the operator's content describing different things.

Rollback copied aside only *tracked* protected files, so a role upstream had
deleted and the operator had recreated at the same path was untracked - and
`git reset --hard` wrote the old commit's copy over it. The stash now also
covers untracked protected paths the target commit writes to, and names them in
keptContent like any other file it saved.

The pending-build marker said only "a compile is owed". An update that found
new commits therefore merged them and built the *new* tree, leaving `.prev`
holding a binary for a commit the state file no longer named - a rollback then
paired old source with the original binary. And a marker left behind after a
successful swap rebuilt and overwrote that same `.prev`. The marker now names
its target commit and the hashes on both sides of the swap, the state records
which commit the live binary came from, an owed build is finished before the
tree moves again, and a retry that finds the swap already done clears the
marker instead of repeating it. Rollback verifies that pairing before touching
anything and refuses (binary_changed) rather than reset the source beside a
binary it cannot account for; an update whose build failed never swapped one,
so its rollback moves the source only and no longer demands a `.prev`.

The version pair is recorded before the config is written, so a crash in
between still leaves a rollback that can put the old number back.
2026-10-08 22:46:17 +08:00
Sycun 9c6928074d fix: a rollback keeps the operator's edits, and a retry really compiles
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).
2026-10-08 16:16:07 +08:00
Sycun 069abc0a7c Merge remote-tracking branch 'origin/main' into feat/self-update
# Conflicts:
#	config.example.yaml
2026-10-08 13:59:27 +08:00
Sycun 0d931569be feat: carry the release version across an update, so the header matches the code
The repository's config.example.yaml ships the release version this code was cut
from (upstream bumps it in the release commit: v1.7.21's config.example says
v1.7.21), while the live config.yaml is operator data that no merge ever touches.
So after an update the header badge - and the ?v= on every static asset - kept
saying the version the installation was born with while the tree already ran
newer code.

An update, an adoption, or a rollback now keeps the two together: after the merge
the update reads the version the new code carries (config.example.yaml) and writes
it into the live config's version field - that one line, temp file plus atomic
rename, everything else byte-for-byte preserved, and only when the value actually
differs. The job log records the change (the page shows the step), and the state
file records both numbers so a rollback puts the old version back with the old
code; a number hand-edited after the update is the operator's and is left alone.
The side effect worth naming: the version bump also changes the ?v= query on
static assets, so a browser stops serving the pre-update JavaScript.

Trees without a live config or without a shipped version are left untouched -
a source checkout has nothing to sync, and nothing is ever guessed.

internal/config gains the two focused helpers (FileVersion / WriteVersion, line
level like the tarball upgrade path always did); tests pin the replace, the
insert-when-absent, byte preservation, the mode, the malformed-value refusal, and
the update/adopt/rollback/leave-alone behaviours end to end.
2026-10-08 13:57:11 +08:00
Sycun 94a18263b9 feat: make the update source one repository address, the official repo by default
The update source used to be three things - a remote name or an address, plus an
optional branch - and unset it followed whatever this directory's remotes and
upstream happened to say. That asked people to understand git topology before
they could update, and the person it was built for could not tell what "follow
the remote this tree tracks" meant. It is now one field: config.yaml update.repo,
an address, empty meaning the official repository
(https://github.com/AIPentest/CyberStrikeAI.git). Point it at a mirror (GitHub is
hard to reach in some places) or at your own fork and that is the whole
configuration.

The branch nothing is any more: an update follows the source repository's own
default branch, resolved from the source itself (ls-remote --symref HEAD), so a
fork whose default is not "main" still works and nobody has to name a branch.
Remote names, the mine/origin/upstream ranking, @{upstream} tracking and the
adopt flow's branch argument are all gone with it.

The console page loses two input fields: the source section is one address, a
hint that empty means the official repository, and a save button; clearing the
address is the way back to the default. The install facts drop the remote name,
the check section shows the source's default branch once the network answer
arrives, and the adopt entry no longer requires saving an address first - the
official default makes connecting a tarball install a zero-configuration action.

The CLI now reads the same update.repo field the page saves (LoadUpdateRepo reads
just that field, without validating the rest of the file - a broken unrelated
section must not block the path that fixes the tree), so the keyboard and the
button cannot update from different repositories. -check-update prints the source
it is about to use.

Tests: the source suite now pins the default (official), the single-address save
(including the empty-string reset), and that the followed branch comes from the
source's own default branch rather than a hardcoded "main"; the console suite
posts the one field and renders the default hint; docs, config.example.yaml and
upgrade.sh describe the one-field story.
2026-10-08 13:46:14 +08:00
Ed1s0nZ edec607731 docs: record password eye merge to main 2026-10-08 13:46:01 +08:00
Ed1s0nZ 4f64347752 docs: record login password eye merge readiness and changelog 2026-10-08 11:54:07 +08:00
Ed1s0nZ af48f6c632 docs: record password eye browser verification 2026-10-08 11:54:04 +08:00
Ed1s0nZ d590cdd714 fix: place accessible password visibility toggle inside login input 2026-10-08 11:52:44 +08:00