feat(suppress): group-suppress warnings + ls + journey + docs (M1.5)
- dangling_suppress_warnings takes an ApplyOwner and walks the group's own
chain (GROUP_CHAIN_LEVELS_CTE) for a group node; runs for both owners.
- GET /groups/{id}/suppressions + `pic suppress ls --group` (client + cmd +
main.rs; --app/--group mutually exclusive).
- suppress journey: a child group declines a parent template for its subtree;
suppress ls --group shows the marker. Docs §4.5 + CLAUDE.md move group-level
suppression from Deferred to implemented.
Completes M1. (An unrelated pre-existing email_inbound dispatch-timing flake
passes in isolation.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,7 @@ pub fn apply_router(service: ApplyService) -> Router {
|
||||
.route("/groups/{id}/triggers", get(group_triggers_handler))
|
||||
.route("/groups/{id}/routes", get(group_routes_handler))
|
||||
.route("/apps/{id}/suppressions", get(app_suppressions_handler))
|
||||
.route("/groups/{id}/suppressions", get(group_suppressions_handler))
|
||||
.with_state(service)
|
||||
}
|
||||
|
||||
@@ -64,6 +65,26 @@ async fn app_suppressions_handler(
|
||||
Ok(Json(report))
|
||||
}
|
||||
|
||||
/// Read-only §11 tail M1 suppression report for a group: the inherited templates
|
||||
/// it declines for its whole subtree (`target_kind`, `reference`). Viewer-tier
|
||||
/// `GroupScriptsRead`. Backs `pic suppress ls --group`.
|
||||
async fn group_suppressions_handler(
|
||||
State(svc): State<ApplyService>,
|
||||
Extension(principal): Extension<Principal>,
|
||||
Path(id_or_slug): Path<String>,
|
||||
) -> Result<Json<Vec<SuppressionInfo>>, ApplyError> {
|
||||
let group_id = resolve_group_id(svc.groups.as_ref(), &id_or_slug).await?;
|
||||
require(
|
||||
svc.authz.as_ref(),
|
||||
&principal,
|
||||
Capability::GroupScriptsRead(group_id),
|
||||
)
|
||||
.await
|
||||
.map_err(map_authz)?;
|
||||
let report = svc.suppression_report(ApplyOwner::Group(group_id)).await?;
|
||||
Ok(Json(report))
|
||||
}
|
||||
|
||||
/// Read-only §11 tail route-template report for a group: its own declared route
|
||||
/// templates (method, host, path, handler script, dispatch, enabled). Viewer-
|
||||
/// tier read. Backs `pic routes ls --group`.
|
||||
|
||||
Reference in New Issue
Block a user