Conversation
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.
Motivation
/healthto showsigner_ok:false,/describeto crash, and/verifyto lack proof fields.Description
CL_*env vars and implement robust PEM loading that converts literal\nescapes to newline and validates input, usingCL_PRIVATE_KEY_PEMandCL_PUBLIC_KEY_B64as the canonical inputs and failing fast at boot if invalid or missing viaassertBootConfigOrThrow().@commandlayer/runtime-corefor canonicalization/signing/verification and ensure signed receipts omit non-deterministic trace/timestamp fields so signatures/hash are stable across runs./verifyto prefer the env public key, supportens=1which strictly resolvescl.sig.pub,cl.sig.kid, andcl.sig.canonical(and enforces signer/kid/canonical match before cryptographic verify), and return clear structured checks/errors with no silent fallbacks.GET /healthnow exposessigner_ok,verifier_ok,kid,canonical_id, andenabled_verbs(no secrets),GET /debug/envreports env presence and key-loading mode (no key material), provide.env.exampledemonstrating single-line\n-escaped PEM, and addscripts/smoke.mjsto exercise the full smoke flow.Testing
node --check server.mjsandnode --check scripts/smoke.mjswith no syntax errors and no type issues.node --env-file=.env server.mjsusing ephemeral keys and ranSMOKE_BASE_URL=http://127.0.0.1:18080 node scripts/smoke.mjs, which printed[smoke] PASSand returned a successful verify payload./healthshowingsigner_ok:trueandverifier_ok:true,describereceipts containingmetadata.proof.hash_sha256andmetadata.proof.signature_b64, and/verifyreturningok:truewithchecks.hash_matches:trueandchecks.signature_valid:true.Codex Task