fix(logging): enforce values-free operational logs - #20
Merged
Conversation
3 tasks
…e-logs # Conflicts: # docs/fork/patches.md
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.
What This Fixes
This PR creates one values-free operational logging boundary for CodeAPI and
also keeps download failures generic at the public HTTP boundary.
{ "error": "Error downloading file" }for download failureswithout exposing the caught error in the response.
This is an independent replacement for the logging/privacy portion of draft
PR #18. Issuer trust remains in PR #19. Optional OpenAPI/type maintenance
remains in PR #21 and is not required by this package or the deployment gate.
How It Works
shared/operational-log.tsowns the pure allowlist and error classifier.bindings.
component: job.server-side sink and returns one fixed public 500 body.
Important Details
child-process output are removed. Unknown errors become
internal.handled without mutating caller-owned values or throwing.
repository has no router/Supertest harness; adding one solely for a static
JSON literal would expand this upstream patch without meaningful additional
coverage.
image, or telemetry change is included.
Branch Coverage
main@83c4f7b105b6b3e69eda12701ad4ec437acba08fd71f81a9c84634b27d30e85b097d88f6a3a495ba83c4f7b..d71f81achild binding, one fixed console bypass, generic download failure, capture
tests, build inclusion, and fork ledger.
Review Focus
console exception.
arbitrary errors, stacks, filenames, paths, or child-process output.
server-side and sanitized.
Verification
At the exact head:
bun run testfromservice/-> 556 pass, 0 fail.bun run testfromapi/-> 354 pass, 16 skip, 0 fail.bun run buildfromservice/-> exit 0.git diff --check origin/main...HEAD-> pass.correction rechecks.
-> all five required jobs passed at
d71f81a.The service build retains existing Rollup/TypeScript warnings outside this
package. No deployment, cluster, production-log, or live-execution proof was
performed.
Security / Privacy
content, or raw production logs are included.
committed head.
Blocking Before Merge
Follow-Up After Merge
mainSHA containing PR fix(auth): bind JWT trust by issuer #19 issuer trust and thisPR before building an image or changing deployment desired state.
image, or deployment prerequisite.
through their separately approved rollout steps.