Skip to content

Make account test_status runtime-only (in-memory cache)#137

Merged
CJackHwang merged 1 commit intodevfrom
codex/optimize-configuration-file-management
Mar 21, 2026
Merged

Make account test_status runtime-only (in-memory cache)#137
CJackHwang merged 1 commit intodevfrom
codex/optimize-configuration-file-management

Conversation

@CJackHwang
Copy link
Owner

Motivation

  • test_status should not be treated as a persisted user configuration field and must behave like runtime state (similar to tokens).
  • Prevent stale/legacy test_status fields from lingering in persisted config files after schema change.

Description

  • Removed TestStatus from the persisted Account struct so test_status is no longer part of saved config (internal/config/config.go).
  • Added an in-memory runtime cache accTest to config.Store with UpdateAccountTestStatus writing only to memory and a new accessor AccountTestStatus to read runtime status (internal/config/store.go, internal/config/store_index.go).
  • On file-backed load, detect legacy "test_status" entries and rewrite the config file without that field to clean up outdated persisted content (loadConfig update in internal/config/store.go).
  • Admin APIs now read test status from the runtime cache and ConfigStore interface was extended with AccountTestStatus; admin listing and tests were updated to use the runtime-only status (internal/admin/handler_accounts_crud.go, internal/admin/deps.go, tests adjusted).

Testing

  • Ran go test ./internal/config ./internal/admin and both packages passed (ok).
  • Ran ./tests/scripts/check-refactor-line-gate.sh which completed with no missing targets.
  • Ran ./tests/scripts/check-node-split-syntax.sh which completed with no syntax issues.

Codex Task

@vercel
Copy link

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Mar 21, 2026 4:50pm

@CJackHwang CJackHwang merged commit 661d753 into dev Mar 21, 2026
3 checks passed
@CJackHwang CJackHwang deleted the codex/optimize-configuration-file-management branch March 21, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant