Repository navigation
Load process settings once - #513
Merged
Merged
Conversation
This was referenced Oct 7, 2026
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
AGENTS.md gives each setting one home, with no second reader or fallback. Before this change, Core read its process environment in about a dozen places, parsed some values twice, and built the public URLs four separate ways. This is T4 in the architecture audit, plus C4, C6, C7 and C9.
processconfig.Load() (Config, error)reads every Core variable once, and the history settings file is part of it.mainpasses the fields down, andoac check-configisLoadwith its error reported.obs/log.LoadConfigis strict, and Core and Web share it. The lenientConfigFromEnvis deleted.deployment.PublicOriginis validated once and derives/v1,/api/v1, the daemon WebSocket and the installer base.coremetrics.Periodic{ID, Every, Run}owns the ticker, panic isolation and job reporting. The job IDs come from the registered jobs.StopJobare deleted.OAC_INSTALL_DIR,OAC_INSTALL_DIR_DEFAULTandOAC_RUNTIME_CLAUDE_SDK_WORKSPACE.OAC_NATIVE_INSTALLER_DIR, now derived as$OAC_PROVIDER_ROOT/native-installers.OAC_PROVIDER_STATE_ROOT, now the constant/statebecause nothing produced another value.OAC_WEB_ORIGIN. Web now readsOAC_PUBLIC_URL, each Web setting has one default, and the healthcheck uses the configured address.docs/configuration.mdnames the setting categories once.#process-settings-configjsonis now#process-settings, and every link to it is updated, including AGENTS.md link targets (no wording change).Not in this change: making the installation ID and the credential key required. That is a separate change because the acceptance harnesses deliberately run Core without a credential key.
Behaviour
oac check-confignow validates the history settings file. Each of its errors is prefixedOAC_HISTORY_SETTINGS_FILE:.OAC_LOG_LEVEL(for examplewarning) is a startup error in both Core and Web. Before, it fell back silently.core.write_audit_retentiondisplays as2160h.Review
A fresh-context blind review found one should-fix (the retention display) and five nits (panic isolation, job ID in the prune log, a zero interval, the history error prefix, the missing-catalog test). All are fixed, and the sampler's "needs a Worker" rule is now structural rather than a comment.
Checks
go build ./...andgo vetfor core, obs and web.go testfor processconfig, obs/log, coremetrics, cmd/server, cmd/oac, api, nativeinstaller, runtimeobs, deployment, environmentconfig and services/web.oac-core check-config, valid and invalid cases.check-names.py, the markdown link check,deploy/compose/test_compose.pyand the translation test.Net: non-test code −149, tests −37, docs +22.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.