mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-30 09:50:04 +08:00
chore: sync declarative effects with dev
This commit is contained in:
+8
-17
@@ -8,12 +8,12 @@ These rules supplement the repository's root `AGENTS.md`.
|
||||
`core::notify::announce` after successful persistence and commit. This keeps
|
||||
failed transactions from publishing state. Independent transactions retain
|
||||
their boundaries and announce via `after_commit`; runtime-only profile
|
||||
activation announces after successful application. New cross-layer
|
||||
exceptions require a rationale in the PR and an update to this file.
|
||||
2. **Register every new `IVerge` field.** Add one row, including an explicit
|
||||
`NoEffect` where appropriate, to the exhaustive registry and preserve its
|
||||
platform attributes. Keep the serialized-field coverage test passing. Manual
|
||||
field-to-flag chains hide missing effects and are forbidden. No exceptions.
|
||||
activation announces after successful application. Cross-layer operations
|
||||
must preserve these ownership and transaction boundaries.
|
||||
2. **Register every new `IVerge` field.** Register the field in the
|
||||
exhaustive effect registry, including an explicit `NoEffect` where
|
||||
appropriate, and preserve its platform attributes. Manual field-to-flag
|
||||
chains hide missing effects and are forbidden.
|
||||
3. **Use `utils::retry` for bounded retries.** Do not introduce handwritten retry
|
||||
loops, including `loop` plus `sleep`; preserve attempt budgets, delays and
|
||||
terminal errors. Permanent watchers are the exception and must document
|
||||
@@ -21,17 +21,8 @@ These rules supplement the repository's root `AGENTS.md`.
|
||||
a retry policy.
|
||||
4. **Keep notifications typed.** Send notice statuses through `NoticeStatus` and
|
||||
use `Arc<str>` for notice message payloads. Preserve the event names and
|
||||
status strings pinned by the golden tests. Status additions or changes
|
||||
require frontend and backend changes in the same PR and an updated golden
|
||||
list; this protects the wire contract. No exceptions.
|
||||
|
||||
Known dead wire entries, recorded here and intentionally kept (no tracking
|
||||
issue): the `config_validate::*` statuses whose frontend handlers never
|
||||
receive a backend send (`core_change`, `stdout_error`, `yaml_key_error`,
|
||||
`yaml_error`, `merge_key_error`, `merge_error`), and `set_config::ok`,
|
||||
sent by the backend with no frontend handler. Each variant carries its own
|
||||
comment in `NoticeStatus`. Removal requires a same-PR frontend change and a
|
||||
golden-list update.
|
||||
status strings as a shared wire contract. Contract changes must keep
|
||||
frontend consumers and backend producers aligned.
|
||||
5. **Preserve lock order.** The order is `config_write` before
|
||||
`config_update_in_progress` before `lifecycle_lock`. Patch callers must use
|
||||
the executor's guarded claim instead of independently combining these locks;
|
||||
|
||||
Reference in New Issue
Block a user