Problem
A bounded periodic collector can attribute managed-task CPU, memory, and process history through st2's existing per-task cgroup scopes. That deliberately provides sampled, not exact, accounting: it can miss the final scrape interval and tasks shorter than the interval. It also cannot answer causal questions such as which process modified a file or opened a connection.
The first resource-observation increment should stay simple. The more exact contract needs a separate decision because it changes st2 lifecycle and durable-state responsibilities.
Design boundary
Investigate these layers independently:
- Exact terminal resource accounting: capture final
cpu.stat and memory.peak when the task cgroup becomes empty, before systemd collects it. Define incarnation identity, idempotent terminal records, crash recovery, and bounded retention.
- Lifecycle event contract: consider an st2-owned typed start/terminal event feed while an external collector continues to own periodic sampling and metrics.
- Broader causal provenance: keep kernel process/file/network collection outside st2. st2 should supply stable managed-task identity and its actual execution-scope binding; a separate collector can join that with kernel evidence.
Do not infer stable identity from the transient systemd unit name. Scope names are intentionally incarnation-unique and their escaped task fragment is lossy. Do not turn st2 into a Prometheus server or provenance database without evidence that the external collector boundary is insufficient.
Decision needed
Establish which consumers require exact per-incarnation totals or causal provenance, then choose the smallest contract that satisfies those queries. Preserve sampled resource history as the default low-complexity path.
Related: #208 covers resource envelopes, limits, and leases. This issue covers observation fidelity and provenance, not admission or containment.
Posted on behalf of @schickling
| field |
value |
agent_identity |
mbp2025.direct.omp.5tek2r48 |
session |
mbp2025.5tek2r48 |
agent_persona |
generalist |
agent_supervisor |
unavailable |
agent_tool |
OMP |
agent_tool_version |
18.0.11 |
agent_runtime |
OMP 18.0.11 |
tooling_profile |
dotfiles@4cc7b25 |
Problem
A bounded periodic collector can attribute managed-task CPU, memory, and process history through st2's existing per-task cgroup scopes. That deliberately provides sampled, not exact, accounting: it can miss the final scrape interval and tasks shorter than the interval. It also cannot answer causal questions such as which process modified a file or opened a connection.
The first resource-observation increment should stay simple. The more exact contract needs a separate decision because it changes st2 lifecycle and durable-state responsibilities.
Design boundary
Investigate these layers independently:
cpu.statandmemory.peakwhen the task cgroup becomes empty, before systemd collects it. Define incarnation identity, idempotent terminal records, crash recovery, and bounded retention.Do not infer stable identity from the transient systemd unit name. Scope names are intentionally incarnation-unique and their escaped task fragment is lossy. Do not turn st2 into a Prometheus server or provenance database without evidence that the external collector boundary is insufficient.
Decision needed
Establish which consumers require exact per-incarnation totals or causal provenance, then choose the smallest contract that satisfies those queries. Preserve sampled resource history as the default low-complexity path.
Related: #208 covers resource envelopes, limits, and leases. This issue covers observation fidelity and provenance, not admission or containment.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile