Repository navigation
id(server_config): [policy] table for freshness window + pull policy (#798) - #1801
Conversation
Wire the existing freshness-window (N23) and pull-policy (P6.5) knobs into the server config surface: a [policy] table with freshness_window_seconds and pull_policy (open|members),deny-unknown-fields strict like the rest of the file, dedicated ConfigError variants for an unknown policy name and a zero window, and typed accessors ServerConfig::policy()/freshness()/pull_policy() so a serve path can build Freshness/PullGate from config. Defaults unchanged when the table is absent (5-minute window, open pull). Five parse tests in the existing server_config style. Consumption by id serve / sync sessions is the follow-up: at HEAD neither seitan nor the gated responder has a production caller to wire into (verified by grep).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🤖 Agent note · parked
|
Implements the config-surface half of #798 (queue task 2657, follow-up of triage task 2232).
What this does
server_configgains a[policy]table, parsed as strictly as the rest of the file (deny_unknown_fields, bad values fail startup):ConfigErrorvariants in the existing style:UnknownPullPolicy(mirrorsUnknownRole) andZeroWindow(a 0-second window would refuse every accept).ServerConfig::policy(),::freshness()(aseitan::Freshnesswith the server level set, world/inviter unset so more specific settings still win), and::pull_policy().[policy]is absent: five-minute window (DEFAULT_WINDOW),PullPolicy::Open.server_configtest style: defaults without the table, both knobs set, unknown policy value refused, unknown policy key refused, zero window refused.pull_policy.rsmodule doc updated to match: the config surface now parses the policy.What this deliberately does not do (and why)
Consumption by
id serve/ sync sessions is not in this PR, because at HEAD there is no production consumption point to wire into — verified by grep: nothing outsideseitanreferencesFreshness/seitan::,PullGateis constructed only in tests, and nothing outsideserver_configitself loadsServerConfig. The gated responder and the seitan admit path are library-stage. Wiring config into serve therefore rides with that integration work; a follow-up is recorded on #798. For the same reason the acceptance brief's line-76 item is not checked off by this PR.Refs #798.
Need help on this PR? Tag
@codesmith-botwith what you need.