@@ -448,7 +448,7 @@ func (s *treeWriter) applyTranscriptBackfill(ctx context.Context, opts UpdateOpt
448448 }
449449 }
450450
451- // Replace prompts with 7-layer -redacted content.
451+ // Replace prompts with regex-only -redacted content.
452452 if len (opts .Prompts ) > 0 {
453453 promptContent := RedactedJoinedPrompts (opts .Prompts )
454454 blobHash , err := CreateBlobFromContent (s .repo , []byte (promptContent ))
@@ -715,7 +715,7 @@ func (s *treeWriter) writeSessionToSubdirectory(ctx context.Context, opts WriteO
715715 }
716716 filePaths .AssetsManifest = manifestPath
717717
718- // Write prompts via the 7-layer pipeline. OPF runs only in the
718+ // Write prompts via the regex-only pipeline. OPF runs only in the
719719 // pre-push rewrite path (manual_commit_opf_rewrite.go).
720720 if len (opts .Prompts ) > 0 {
721721 promptContent := RedactedJoinedPrompts (opts .Prompts )
@@ -2254,12 +2254,13 @@ func (s *treeWriter) copyMetadataDir(ctx context.Context, metadataDir, sessionDi
22542254 return fmt .Errorf ("path traversal detected: %s" , relPath )
22552255 }
22562256
2257- // Create blob from file with 7-layer secrets redaction.
2258- // Post-commit emits 7-layer-only blobs; the pre-push rewrite
2257+ // Create blob from file with regex-only secrets redaction (the
2258+ // eight always-on/opt-in layers).
2259+ // Post-commit emits regex-only blobs; the pre-push rewrite
22592260 // (strategy/manual_commit_opf_rewrite.go) walks the resulting
22602261 // tree, re-redacts these blobs with OPF when enabled, and
2261- // rewrites entire/checkpoints/v1 into 8-layer commits before
2262- // they leave the local machine.
2262+ // rewrites entire/checkpoints/v1 into OPF-applied (9-layer)
2263+ // commits before they leave the local machine.
22632264 blobHash , mode , err := createRedactedBlobFromFile (ctx , s .repo , path , relPath )
22642265 if err != nil {
22652266 return fmt .Errorf ("failed to create blob for %s: %w" , path , err )
@@ -2281,12 +2282,13 @@ func (s *treeWriter) copyMetadataDir(ctx context.Context, metadataDir, sessionDi
22812282 return nil
22822283}
22832284
2284- // createRedactedBlobFromFile reads a file, applies the 7-layer redaction
2285- // pipeline, and creates a git blob. Used by committed-checkpoint writes
2286- // at post-commit time. The OpenAI Privacy Filter is intentionally NOT
2287- // run here — OPF lives in the pre-push rewrite path
2288- // (strategy/manual_commit_opf_rewrite.go), which re-redacts the 7-layer
2289- // blobs into 8-layer commits before they leave the local machine.
2285+ // createRedactedBlobFromFile reads a file, applies the regex-only redaction
2286+ // pipeline (the eight always-on/opt-in layers), and creates a git blob. Used
2287+ // by committed-checkpoint writes at post-commit time. The OpenAI Privacy
2288+ // Filter is intentionally NOT run here — OPF lives in the pre-push rewrite
2289+ // path (strategy/manual_commit_opf_rewrite.go), which re-redacts the
2290+ // regex-only blobs into OPF-applied (9-layer) commits before they leave the
2291+ // local machine.
22902292// JSONL files get JSONL-aware redaction; all other files get plain byte redaction.
22912293func createRedactedBlobFromFile (ctx context.Context , repo * git.Repository , filePath , treePath string ) (plumbing.Hash , filemode.FileMode , error ) {
22922294 info , err := os .Stat (filePath )
@@ -2328,8 +2330,8 @@ func createRedactedBlobFromFile(ctx context.Context, repo *git.Repository, fileP
23282330// JSON-shaped files (.jsonl or .json) get JSON-aware redaction (falling
23292331// back to plain bytes on parse failure so regex/credential layers
23302332// still apply); other files get plain byte redaction. When
2331- // usePrivacyFilter is true the full 8 -layer pipeline (including OPF)
2332- // runs; otherwise the 7-layer pipeline .
2333+ // usePrivacyFilter is true the full 9 -layer pipeline (the eight regex
2334+ // layers plus OPF) runs; otherwise just the eight regex layers .
23332335//
23342336// .json is handled alongside .jsonl because checkpoint metadata files
23352337// (metadata.json, per-session metadata.json) carry free-form fields
0 commit comments