feat(runtime-services): add native ephemeral MariaDB provider#2062
Merged
Conversation
Collaborator
Author
|
Second-pass hardening is pushed in Implemented:
Verification:
All focused tests passed. Real integration was explicitly skipped by the readiness gate with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
provider: native,engine: mariadbruntime-service provider backed by a fresh private daemon and filesystemruntime-service:mysql:native:mariadbthrough the public runtime descriptor and contract manifest for Homeboy Extensions #2412/#2413 negotiationCloses #2060
Threat model and isolation proof
mkdtemproot containing its private socket, PID file, log, temporary directory, and fixed ext4 datadir imageprlimit; database commands begin with--no-defaultsfuse2fs; device, byte, and inode geometry are proven before initializationprlimit,truncate,mkfs.ext4,fuse2fs,fusermount3, and working unprivileged FUSE containment are availableruntime@127.0.0.1account uses loopback TCPHard resource containment
MariaDB additionally uses fixed 32 MiB buffer-pool maximums, 10 connections, one thread-pool group, disabled file-per-table storage, a 96 MiB maximum shared InnoDB data file, a 32 MiB maximum temp file, and a 32 MiB redo log. Linux evidence records post-readiness RSS; the real integration requires observed RSS at or below 128 MiB despite the 2 GiB hard address-space ceiling.
Cleanup state machine
SHUTDOWNthrough the validated limited client.EBUSYresults.released/completedor bounded teardown-failure states.Tests
npm run buildnpm run test:runtime-servicesnpm run test:runtime-services-lifecyclenpm run test:native-mariadb-runtime-service-integration(three consecutive real runs)npm run test:runtime-contract-manifestnpm run test:provider-runtime-contractsnpm run test:redactionnpm run test:schema-paritynpm run test:production-boundary-enforcementnpm run test:release-package-coverageCoverage includes root rejection, missing containment capabilities, exact hard-limit argv, hostile filesystem geometry, stale-log retry refusal, daemon crash, bind collision, stop failure, cancellation at preflight/initialization/readiness/administration/runtime-account phases, path/symlink attacks, direct process ownership, successful-peer cleanup after partial concurrency failure, advisory locks, concurrent sessions/providers, transactions, multisite-compatible schema operations, Playground mysqli execution, final lifecycle evidence, output bounds, and secret redaction.
The real integration creates only provider-owned temporary ext4 images, FUSE mounts, and MariaDB processes and recursively proves cleanup. It never reads or contacts a production daemon, socket, credentials, defaults, or data directory.
Integration contract
Homeboy Extensions #2412 emits the generic runtime-service declaration documented in
docs/native-mariadb-runtime-service.md. #2413 negotiates the stable public capabilityruntime-service:mysql:native:mariadb; WP Codebox owns all identity, process, filesystem, secret, and cleanup details.