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

13 Commits

Author SHA1 Message Date
aziascreations 1a1603f3f3 Added a C# binding, packaged as NibblePoker.BakaShrot.Client on NuGet
- bindings/csharp/NibblePoker.BakaShrot.Client: P/Invoke over the DLL's
  UTF-16 exports, one Client per handle (namespace NibblePoker.BakaShrot).
  C# 2 and the .NET 2.0 BCL only: net35 (.NET Framework 2.0 and up) and
  netstandard2.0 (.NET Core 2.0 and up, .NET 5 and up)
- No JSON or TOML parsing: ListTopics, ListNodes and Query return the raw
  JSON string for the caller to parse; settings go to the constructor
- The package: the four native libraries under runtimes/<rid>/native/,
  their THIRD-PARTY.txt under licenses/<rid>/, and a build/net35 .targets
  copying the right one next to .NET Framework apps (which ignore
  runtimes/)
- CI: a nuget job after the four release builds packs it with the
  release's version and libraries, checks the listing and keeps it as
  the bakashrot-nuget artifact
- Tests: an NUnit project (net48 and net8.0) against a real server with
  certificates from `bakashrot cert`, 13 tests
- release.py ships BakaShrot.cs in csharp/; docs/client.md, building.md,
  readme.md, revamp.md (step 14) updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:50:05 +01:00
aziascreations 8597ef0aa8 Updated readmes to make them simpler 2026-11-17 06:51:43 +01:00
aziascreations a5a2f65442 Fixed two peers sending the same attachment at once, Noted the stream limits, Removed the PureBasic-era leftovers
- An attachment is received from one peer at a time: the others are
  refused NotReady and ask again at their next sync; one cut short lets
  the next one take it over
- A 'replicating' row with all its bytes but never checked is asked
  again from part 0, and a peer asking from the wrong part resets it
- Noted the stream limit (1,048,575 topic/node pairs, 2^43-1 message ids
  each) in the example config and known-issues.md
- Removed NoDefaultTopic (code 6, retired), Writer::vacuum, the v8
  detection and the old ini key tests
- Cleared the PureBasic-era notes from the docs, revamp.md keeping only
  the old open items still unfixed; noted the GUI explorer (egui)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:23:33 +01:00
aziascreations 39ba7fce6c Added bench.ps1, Made a CRL file not there yet revoke nothing for clients too
- bench.ps1 runs the benchmarks (push_rate, replication_rate,
  compare_with_old) in release mode: -Only, -Sync full|normal. Plan
  step 13 done, every step of the plan is.
- A CRL file named in client.toml that isn't there yet: nothing revoked
  (the tool, Python's from_file), as on the server, which now warns in
  its log. A path given to the DLL's SetCrl or Client(crl=...) stays a
  FileError. Decided in revamp.md, dropped from known-issues.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:36:59 +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 7709438aab Added the test lab guide, Stopped logging clients closing without close_notify
docs/lab.md: a lab of two servers replicating each other and three
clients, step by step: the certificates, the configs, what to try
(replication, attachments, queries, refusals, catching up, revocation,
Python, Docker), each command run as written.

The server took a client leaving without TLS's close_notify (every tool
command, the DLL, a killed process) for an error and logged it at INFO
on every connection: it's a normal close now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:21:29 +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 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
aziascreations 5887e70e70 Added python wheel stuff, Added libsodium's license for packaging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:55:32 +01:00
aziascreations 42bd1f76d9 Added headers, Added license, Added docker example, Cleared trash
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:35:28 +01:00
aziascreations a0daf73c8e Initial commit 2026-11-05 22:45:47 +01:00