Commit Graph

23 Commits

Author SHA1 Message Date
118f265862 docs: add HIPAA-ready positioning for architecture and pitch
- clarify BEDS is compliance-friendly architecture, not certification
- add healthcare/regulated deployment framing to visual brief
- document controls BEDS provides vs contract implementation responsibilities
- update wiki index description for regulated-deployment positioning
2026-04-12 08:24:12 -07:00
75163fb520 feat: add preflight environment checklist script
scripts/preflight.sh checks all required dependencies:
- Rust/Cargo build toolchain
- RabbitMQ (installed + reachable + management plugin)
- MongoDB (installed + reachable)
- MariaDB (installed + reachable)
- Apache + PHP + php-mongodb (observer tool requirements)

Modes:
  --check    report only, no installs
  (default)  check + apt install missing packages (Debian/Ubuntu)

Idempotent, no sudo prompts during check-only mode.
Detection uses dpkg/systemctl rather than PATH-dependent command -v.
2026-04-10 18:21:47 -07:00
a648e784ce docs: add prerequisites section, fix project structure and status table
- Add Prerequisites section: Rust, RabbitMQ, MongoDB, MariaDB, Apache+PHP
- Document Apache+PHP as required for observer tool with install commands
- Explain rationale: observer must be independent of BEDS binary
- Update project structure tree to reflect unified dispatcher + new modules
- Fix status table: reflect completed dispatcher, template registry, retry/DLQ,
  resident runtime, logger store, dispatch traits; mark PHP observer as Next
2026-04-10 18:11:44 -07:00
3c54635924 docs: comprehensive architecture delta record for hardening phase
Catalogs all architectural changes from resident runtime implementation:
- Runtime model: daemon-like process with coordinated shutdown
- Broker dispatch: shutdown operation integration
- Logger persistence: explicit IPL logging to MongoDB with root GUID lineage
- Developer diagnostics: chain tracing and web-based observability
- Config system: trace_on and logger_admin controls
- Observability utility: modern log_dumper web UI (replaces legacy PHP dumper)
- Operational safety: dev-only purge-on-IPL controls

Files modified: 13 (src/main.rs, brokers/*, config/*, bin/log_dumper.rs, Cargo.*, wiki/*)
Dependencies added: axum, chrono, uuid

See wiki/12-architecture-deltas.md for full details.
2026-04-10 17:12:01 -07:00
14ec58318b feat: resident runtime, shutdown command, observatory, and IPL logging hardening
- keep BEDS resident after IPL and coordinate clean shutdown
- propagate AMQP shutdown command across dispatcher pool
- add structured IPL milestone/event-chain logging with root GUID context
- add optional trace_on config for verbose method-entry diagnostics
- add dev purge-on-IPL controls for admin/logger collections
- add log level showcase events after IPL node-green
- add Mongo logger store helpers for chain/root lookup and purge
- add/modernize BEDS Observatory log_dumper utility UI and root record view
- refresh source headers and wiki docs for current architecture/runtime
- add architecture visual brief for leadership/image-generation workflows
2026-04-10 13:42:39 -07:00
0af80612bb refactor: collapse r_broker+w_broker into unified dispatcher pool
- Single dispatcher pool replaces separate rBroker and wBroker pools
- All events consumed from single queue (beds.events)
- Template lookup reveals schema; class instantiation owns business logic
- Transport layer (dispatcher) is data-schema-agnostic
- AMQP consumer groups handle load-balancing natively
- Reduces exchange/queue topology overhead (no strict rec.read/rec.write)
- Maintains same queue names and routing keys for operator clarity
- r_broker.rs and w_broker.rs retained as reference (can be removed)

Implements architecture decision from user conversation on 2026-04-09.
2026-04-09 14:30:48 -07:00
516a740505 milestone: add runtime template state and dlq/retry broker topology 2026-04-06 18:41:17 -07:00
836a968806 milestone: enforce required services and add mongo logger PoC path 2026-04-06 18:16:48 -07:00
dd04fb5168 docs: preserve historical design intent in modernization roadmap 2026-04-06 17:11:00 -07:00
3ebcd78554 docs: add modernization roadmap and update wiki index 2026-04-06 11:33:55 -07:00
de1b284ab2 milestone: AI switchover baseline (0.1.x) 2026-04-06 11:28:27 -07:00
ebefb15a87 Add rBroker + wBroker pool, BrokerPayload, NamasteCore trait stub
- src/brokers/: pool manager, r_broker (rec.read), w_broker (rec.write),
  BrokerPayload struct, BrokerError type
- src/core/: NamasteCore trait — fetch/write/update/delete interface, stubs
- IPL step 6: spawns rBroker + wBroker pools after exchange declaration
- tests/broker_pool_test.rs: integration tests for pool spawn (skip if broker down)
- BrokerPayload unit tests + doctest in payload.rs
- Added futures-lite, serde_json to Cargo.toml
- README.md, CLAUDE.md, wiki updated to reflect new structure and status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 20:18:31 -07:00
f50396b390 Add structs/logging docs, wiki/07-notes with Spew architecture, fix Home index
- src/config/structs.rs: full file header + rustdoc on every struct and field
- src/logging.rs: full file header + rustdoc on init_from_config(), inline comments
- wiki/07-notes.md: design notes page — Spew/no-nazi-twitter concept documented
  (Justin Bieber fan-out problem, KWIC moderation gate, IPFS media storage,
   timeline assembly tradeoffs, open questions, architecture diagram)
- wiki/Home.md: corrected broken 07-broker-calls.md link; added notes section
- README.md: added wiki/07-notes.md to wiki index

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 20:48:21 -07:00
e8fdb39ea2 Promote service modules to services/ directory; add AmqpConnection + async IPL
- Flat src/amqp.rs, src/mongo.rs, src/mariadb.rs promoted to src/services/{amqp,mongo,mariadb}/
- services/amqp/connection.rs: AmqpConnection struct with connect() and declare_exchange()
- services/amqp/error.rs: AmqpError type (thiserror, wraps lapin::Error)
- ipl() made async; #[tokio::main] added to main()
- IPL step 3b: authenticate to RabbitMQ + declare beds.events topic exchange (durable)
- Added lapin = "2" and tokio = { version = "1", features = ["full"] } to Cargo.toml
- 12 unit tests pass
- Docs: README, CLAUDE.md, wiki/04-ipl.md, wiki/06-queue-topology.md updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 16:52:18 -07:00
2a9afe7d77 Add MariaDB IPL validation, topology docs in beds.toml, and developer wiki
- Add MariaDB (REL) IPL validation — master required, secondary non-fatal
- Add RelNodeConfig / RelInstanceConfig structs with master/secondary pattern
- Add rel_services section to beds.toml and test fixture
- Add detailed topology commentary to beds.toml covering standalone,
  master/replica, Galera cluster, and multi-DB-per-node configurations
- Add developer wiki (wiki/) covering:
    - Origin story — PHP Namaste history, production record, why Rust
    - Architecture overview — full system diagram, all layers explained
    - The four nodes — appServer, admin, segundo, tercero with real-world context
    - IPL sequence — every step documented with rationale for ordering
    - Configuration system — layering, env selection, adding new sections
    - Queue topology — exchanges, routing keys, broker bindings, vhost isolation
    - Template system — REC/REL, TLA convention, cache map, warehousing
    - Event lineage — compound event IDs, parent/child tracking, msLogs schema
    - Glossary
- Update README with wiki index and MariaDB status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:41:28 -07:00
2ce87710ff Add MongoDB reachability validation to IPL sequence
- Add rec_services config section to beds.toml and test fixture
- Add RecNodeConfig struct; export from config module
- Add mongo::validate() and validate_all() — TCP ping per configured REC node
- Wire mongo::validate_all() into ipl() with env-aware error handling
- Add mongodb crate dependency (sync feature)
- Add unit tests for mongo validate error paths (closed port, bad address)
- Update README status table and project structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:12:13 -07:00
119ec0ea45 Update README and CLAUDE.md to reflect current project state
- Project structure updated: amqp.rs, lib.rs, tests/, templates/, env_* config files
- Configuration section updated: BEDS_ENV-based env file selection
- Status table updated: completed items marked done, next steps listed
- CLAUDE.md: split current structure from planned additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 19:34:40 -07:00
c1d1ff14a5 Add RabbitMQ validation, test scaffolding, and config refactor
- Extract ipl() from main() with env-aware error handling (fatal in prod, warn in dev)
- Add amqp::validate() — TCP reachability check for RabbitMQ at IPL
- Refactor config::load() into load() + load_from() for testability
- Add lib.rs to expose public API to integration test harness
- Add test fixture scaffolding: tests/fixtures/beds_test.toml, tests/common/mod.rs
- Add unit tests for amqp::validate() error paths (closed port, bad address)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 19:32:24 -07:00
8a89fe3403 Architecture session: queue topology, log schema, REC templates, config refinements
- Rename env.toml to env_{dev,qa,prod}.toml for self-documentation; enforce via gitignore
- Config loader selects env file via BEDS_ENV environment variable, defaults to dev
- Set wbid to "ms" in beds.toml
- Define queue topology: rel/rec .read .write .obj, log, adm, mig
- Define log event schema: compound event_id (node.env.guid), parent_id, depth,
  level/level_val, resource, service, env, node, file, method, line, trace, message, created
- Add example_rec.toml — canonical self-documenting REC template for future developers
- Add mst_logger_rec.toml — logger collection template derived from log event schema

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 17:07:18 -07:00
850993edb1 Drop DynamoDB from scope
Was originally a proof of concept in the PHP version. Dropped in
production as too expensive. Removed all references from docs.
Supported backends are MySQL/MariaDB and MongoDB only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 11:06:20 -07:00
c87c3f1bac Add README
Documents architecture, design principles, node topology, scaling
model, config system, and performance baseline inherited from the
PHP predecessor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 12:35:41 -07:00
22c74b2671 Establish config loading and logging infrastructure
First working milestone of the Rust rewrite. Implements the two
foundational systems every other component depends on:

- TOML-based layered config (beds.toml + env.toml override) replacing
  the PHP XML config system, fully deserialized into typed structs via
  serde — no runtime string key lookups, shape enforced at compile time
- Structured logging via tracing + tracing-journald, with optional
  console mirror, initialized from config before any services start

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 12:33:52 -07:00
bb6df8314c Initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 11:20:27 -07:00