1
0
mirror of https://github.com/aziascreations/BakaShrot.git synced 2026-11-23 20:58:46 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
aziascreations c86dc8798e Added the list_topics and list_nodes role flags, Filtered the nodes listed by the roles
- `list_topics` / `list_nodes`: listing answers every topic, every node
  with messages, without reading any (`query` gives both).
- Without them, listing nodes only answers those with messages in the
  topics the roles may read (every node until now).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 01:40:01 +01:00
aziascreations cf8264b21d Made the roles the only lists of topics, Refused PRAGMAs in queries
- Removed `[server] topics` and `[replication] replicated_topics`: a push
  is taken by its roles' `push_topics`, a replicated message by the
  peer's `accept_topics`; a topic exists from its first message.
- Topics that only came from a peer are read and listed like any other;
  `ListNames` lists the topics with messages, filtered by the roles.
- A push to a topic no role names is `NotAllowed`; `UnknownName` is only
  for nodes.
- Clients' queries: every PRAGMA refused as it's prepared (SQLite's
  authorizer), `PRAGMA query_only = 0` used to take effect.
- Noted the leads found by reading the code in `docs/known-issues.md`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 01:28:24 +01:00
aziascreations 25ab88aa91 Hardened CI, Split the image push, Kept latest for releases only
The workflow's token is read-only but in the Docker jobs, where it's
only given to docker login after the image is built and checked; it goes
through env, never into a script. Checkouts don't keep it on disk (a
crate's build script can't read it), the actions are pinned to their
commits (checkout, setup-python and upload-artifact v7, on Node 24),
cargo builds with --locked (test.ps1 too), every job has a time limit,
and the image tag is checked before use. latest only moves for versions
without a "-". The login and the push are separate steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:35:08 +01:00
aziascreations 5045019df4 Moved the workspace to the root, Added the build scripts, ARM64 releases and the Docker image
Source/'s content is at the root now, Source/README.md merged into
readme.md. Scripts at the root: build.ps1, test.ps1 (was check.ps1),
release.ps1 (over release.py) and clean.ps1. Everything is LF except the
.ps1 files.

CI (.github/workflows/ci.yml) runs on a v* tag or by hand: the checks,
then a release for Windows x64 and ARM64 and Linux x64 and ARM64, each on
its own kind of runner, the archives kept as artifacts. release.py names
the platform from the Rust host, make_wheel.py tags the wheel from the
library's header.

docker/: the server's image (built from source, the tools beside it, uid
10001), compose.yml and test.sh. CI builds amd64 and arm64 natively,
checks them, and on a tag pushes them to ghcr.io with an index for
<version> and latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:13:44 +01:00
aziascreations 17ec69c03c Removed the PureBasic version, Fixed refused certificates seen as lost connections
OldSource/ is deleted, with its PB-MessagePack submodule: it stays in git
history (up to 68966a8). What of its notes still holds is in
Source/docs/known-issues.md (the threat model, the known limits, ideas
for later); the old Docker image's publishing notes are in revamp.md's
step 13, the wheel's and releases' in Source/README.md. The Rust tests
are now the one runner. readme.md describes the Rust version.

The server now closes gently after refusing a certificate (shutdown,
then reading until the client closes, 1 s at most): closing at once
reset the connection, which could beat TLS's alert to the client
(ConnectionLost instead of AuthRejected, 14 of 160 runs under load).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 00:42:19 +01:00
aziascreations 68966a8031 Added replication, Added clean stops, logs and releases (0.2.0)
Step 11: the servers replicate by name (push_to and accept_from), their
messages and attachments, damaged copies asked for again.

Step 12: the server stops cleanly on SIGTERM/SIGINT (Ctrl+C, Ctrl+Break
and the console closing on Windows), committing what was queued; logs go
to the console, BAKASHROT_LOG sets the level. release.py builds a
release per platform (the programs, the DLL, a Python wheel with the
library, THIRD-PARTY.txt) and smoke-tests it; CI runs it on v* tags.
Built for size (opt-level "s"): 25-31% smaller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:38:32 +01:00
aziascreations e044fcf359 Moved the PureBasic version to OldSource/, Started the Rust rewrite in Source/
The rewrite's plan and decisions are in revamp.md. Steps 0 to 10 are done:
the workspace and checks, bakashrot-proto, bakashrot-pki and
bakashrot-cert, bakashrot-config, bakashrot-storage (schema v9), the
server and the client library (every request but replication's,
attachments and retention included), the C DLL with its C, PureBasic and
Python bindings, and the bakashrot tool. Step 11 (replication) is next.

OldSource/ is the old implementation, kept building and passing as the
reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwFeVTGs2SsufaH6zquzcb
2026-11-14 12:47:40 +01:00