Skip to content

cellstore: background seal notices go to the log, not through the chat frame - #2030

Merged
santoshkumarradha merged 2 commits into
devfrom
fix/guard-notices-off-terminal
Oct 29, 2026
Merged

santoshkumarradha merged 2 commits into
devfrom
fix/guard-notices-off-terminal

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

Background seals inside the full-screen chat printed raw rows through the frame. The older-chat copier (runOlderChats, started in runSurface) seals with cellstore.EngineFor, whose Guard has no notice route, so every file kept out for a secret went straight to os.Stderr. A project whose tests carry fake keys (sk-live-… in Swift fixtures) printed one row per file across the Memory page.

 runSurface
   withSurfaceLogger            # log -> chat.log while the surface owns the terminal
   runOlderChats
     copyOlderChat
       EngineFor(...).Seal
         Guard.Look
           announce -> notify
-            fmt.Fprintln(os.Stderr, "codeaf: "+line)   # raw row through the frame
+            log.Printf("seal guard: %s", line)          # chat.log under the surface, stderr outside it

Engines with a route (WithNotices, the chat seat) are unchanged.

Evidence

  • Before: with the Memory page open, rows such as codeaf: Tests/CodeAFCoreTests/BrowseTests.swift looks like it holds a secret (api-key-sk), so it is kept out of the saved history; … overwrite the frame.
    After: the same line lands in the profile's chat.log; nothing is written to the terminal.
  • New test TestAGuardWithNoRouteLogsItsNoticeAndWritesNothingToStderr: a zero-route Guard screens a fixture with a fake key; stderr stays empty, the log names the file and never the key.
  • Spark gate results to follow in a comment.

Merge Danger

Door: two-way

One fallback line and its comments; revert restores the old behavior.

Blast Radius: small

Command-line paths that seal with no route now print the notice through the standard logger (timestamp prefix, seal guard: instead of codeaf:) rather than raw stderr. No test or script matched the old prefix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TBxwSLogRn4kB7hneaeJzH

…derr

The older-chat copier runs inside the full-screen surface and seals with an
engine that has no notice route. Each file it kept out for a secret (fake keys
in test fixtures) was written straight to os.Stderr and tore through the frame.
The standard logger is parked in chat.log for the surface's lifetime, so the
fallback now writes there; outside the surface the logger is still stderr.
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Spark gate at b96cccc (base dev 66fa77e):

  • go test -race on the guard tests, including the new TestAGuardWithNoRouteLogsItsNoticeAndWritesNothingToStderr: ok
  • make pr-ready → test-quick: all ok
  • internal/cellstore full package: one failure, TestStartupInALargeHomeWalksNoHome (homecapture_test.go:188: the chat was not sealed). This test already fails on dev: with the linux furrow embedded it fails 20/20 on dev 66fa77e and 20/20 on this branch. The test sets WithNotices, so the fallback changed here never runs in it. Touched-test attribution said 'inconclusive' only because its base tree had no furrow, so the test skipped there.
  • darwin/arm64 make build: ok (codeaf b96cccc8)

@santoshkumarradha
santoshkumarradha merged commit b8f62f6 into dev Oct 29, 2026
6 checks passed
@santoshkumarradha
santoshkumarradha deleted the fix/guard-notices-off-terminal branch October 29, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants