Make the jdrive library embeddable for jsh (state-I/O override + credential injection + transpile) #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/state-io-embed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Prepares jerboa-drive to be vendored by jerboa-shell-extras as the
jdiskfeature (follow-up PRs there). Three additions, no standalone behavior change beyond the noted improvement:(jdrive s3 drive): new exported*jdrive-state-io-override*parameter +jdrive-state-opdispatcher. All profile-state filesystem touchpoints (init/load/profile-status, generation marks) route through it. Default backend = plain filesystem; the defaultwriteop now uses the secure-output path for ALL state files (0600, symlink-safe) — profile config/vault files were previously written 0644.*jdrive-aws-credentials*parameter in(jdrive s3 config). When set to(access-key secret-key region token),jdrive-s3-status-jsonands3-client-from-configpass explicit'access-key:/'secret-key:/'token:keywords toS3Client, suppressing the internalaws-resolve-credentialscall. Secrets never enter the process environment. (Keyword is'token:per jerboa-awss3/apikw-ref.)--state-dirflag, the default root is//embed/jdrive— it wins overJDRIVE_STATE_DIR(an ambient env var must not redirect a hardened host back to plaintext disk). An explicit flag still wins. Standalone jdrive is unaffected (the parameter defaults to#f).transpileMakefile target: copies the(library ...)sources verbatim tolib/jdrive/**.sls(the extension Chez library search expects) for--libdirsconsumers.lib/is gitignored and removed bymake clean.with-unlocked-profileands3-client-from-config; syncs the stalejpkg.sexp(1.8.4) and the CLI version string; VERSION 1.9.3 → 1.10.0.Verification
make test: 79 checks green (74 existing + 5 new: parameter defaults, embed-root precedence, in-memory backend round-trip of init→load, status-json credential injection incl. session token, client construction with injected creds).make binary+jdrive-bin version→1.10.0;--helpOK.JDRIVE_STATE_DIR=/tmp/... jdrive-bin s3 initwrites plain files (now 0600);s3 profile-statusreads them back.make transpile+jerbuild execwith a lib-first libdir loads(jdrive s3 config)/(jdrive s3 drive)from the.slstree and exercises the new parameters.setenv(grep clean; only the pre-existingJDRIVE_PACK_SMALL_FILESflag).Note: the jsh-side consumer lands in a jerboa-shell-extras PR that pins this branch tip in its
source-lock.tsv; after merge that lock row should be updated to the merge commit.