mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-16 19:29:33 +01:00
fix: keep a home value that is not a path off disk, and re-apply from the own home (release review)
getCustomModelForPersist() trusted homeEnvVar to name a path, but the registry types it as any env name, so a clis.json override could write a session's own credential to state.json. Only an absolute path is written now. A re-apply resolved the CLI's real home from what the session's map held, which under a selection is the injected directory, and recovery resolved none at all. An entry the own home lacks (settings.yaml) was then linked from the server's home on an endpoint switch and on recovery. The route now reads the new Session.ownEnvValue(), and recovery reads the clamped record through the same bounded guard, under the bulk cap since it walks every saved session. Also corrects the comment that said only a removed directory gets its links again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
10d43b993e
commit
db5222c4fa
9 files changed
+149
-27
No files matched your search
@@ -464,6 +464,8 @@ export class MockSession extends EventEmitter {
|
||||
/** Mirrors Session.envOverrideValue; no override map here, so the custom-model
|
||||
* real-home lookup defaults to "session says nothing" (overridable per test). */
|
||||
envOverrideValue = vi.fn((_key: string): string | undefined => undefined);
|
||||
/** Mirrors Session.ownEnvValue, same default. */
|
||||
ownEnvValue = vi.fn((_key: string): string | undefined => undefined);
|
||||
getCustomModelForPersist = vi.fn(() => this._mockCustomModel);
|
||||
/** Mirrors Session.noteReportedModel: the statusline route records the CLI's model. */
|
||||
reportedModel: { model: string; source: 'statusline' | 'screen' } | null = null;
|
||||
|
||||
Reference in new issue
Block a user