feat(neo): native ~/.senpi store readers + neo.theme write path (neo-go-tui task 4)#121
Merged
Conversation
internal/store: agent-dir resolution (env-derived from AppName, mirroring config.ts), settings global+project merge with project .pi/settings.json precedence, keybindings.json reader, sessions scanner (safe-path dirs, <timestamp>_<id>.jsonl, SessionHeader + picker-sufficient SessionEntry parsing with corrupted-line skip), models.json, auth.json presence/type map only (key material never enters structs — guarded by a falsifiable canary-marshal test), custom themes listing. Settings writes replicate FileSettingsStorage.withLock (same lockfile path + retry semantics, read-merge-write of only neo fields, never whole-file overwrite) and persist the skin under a separate neo.theme key; a concurrent-writer race test pins coexistence with a classic senpi writer. Config parameterizes app naming so a pi build resolves .pi/ through every entry point. qaharness/writeqa are the manual-QA driver commands. Plan: .omo/plans/neo-go-tui.md
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 34569191 | Triggered | Generic High Entropy Secret | 3aaf769 | packages/neo/internal/store/auth_test.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
Summary
Plan task 4 of
.omo/plans/neo-go-tui.md: native Go readers for the~/.senpistore (settings, keybindings, sessions, models, auth presence, themes) plus the lock-replicating settings write path the neo TUI persists its skin through. Additive only,packages/neointernal.Changes
internal/store: agent-dir resolution (env derived from AppName, mirroringconfig.ts— apibuild readsPI_CODING_AGENT_DIR/.pi), settings global+project merge (project wins), keybindings reader, sessions scanner (safe-path dirs,<timestamp>_<id>.jsonl, header+entry parsing sufficient for the picker, corrupted-line skip-with-warning), models.json, auth presence/type map only, custom themes listing.settings_write.go: replicatesFileSettingsStorage.withLock(same lockfile path + retry semantics; read-current → merge only neo fields → write; never whole-file overwrite); persistsneo.themeas a separate key — classicthemeis never written.qaharness/writeqa: manual-QA driver commands.QA / Evidence
Evidence:
.omo/evidence/task-4-neo-go-tui.txt(+ task-4-qa/) in the work worktree.-race; corrupted-JSONL fixture skipped, not fatal.lsground truth (machine-checked report); missing agent dir → clean defaults, no crash; real~/.senpi/agent/auth.jsonsha256 identical before/after.Configparameterization fixed TDD-first (pi-build resolves.pi/through both entry points, RED captured before the fix); evidence counts corrected. Re-audit verdict: real, no issues.-count=1+-racegreen;npm run checkexit 0.Risks
neo.themeisolation keeps classic behavior untouched.Secret safety
No key material ever enters store structs (canary-guarded); no secrets in fixtures or evidence.
Summary by cubic
Adds native Go readers for the
~/.senpistore and a lock-replicating settings write path so the neo TUI can read config and persist its skin safely without affecting classic behavior. Changes are additive and internal topackages/neo/internal/store, mirroring the classic TypeScript loaders.Config(env override fromAppName; defaults to<home>/.senpi/agent), supportingsenpiandpi(.pi) builds.projectwins); readneo.themewith fallback to classictheme; writer merges onlyneo.themeunder the same<settings.json>.lockdirectory lock (retries + stale handling), never overwrites the file or touches classictheme; project scope respectsConfigDirName.<timestamp>_<id>.jsonl; count messages, first user message, created/modified times; skip corrupt JSONL lines with warnings; handles very long lines.keybindings.jsonas action → keys (string or array of strings); malformed or mixed types are ignored; missing file yields defaults.models.json(providers map + optional disabledProviders); missing file is OK; corrupt file returns an error.api_key/oauth); never read or store key material (guarded by canary tests).themes/by inner"name"; non-JSON or nameless files are skipped.qaharness(sandbox scan/isolation) andwriteqa(write-path receipt).Written for commit 3aaf769. Summary will update on new commits.