31 lines
2.0 KiB
Markdown
31 lines
2.0 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Run aggregates contiguous process log entries durably
|
|
The Run log spool SHALL persist contiguous entries from one stream as bounded multi-entry batches before upload. Each persisted batch MUST retain one stream identity, an ordered contiguous sequence range, and a checksum covering its complete entries.
|
|
|
|
#### Scenario: High-volume process output is captured
|
|
- **WHEN** a supervised process emits consecutive lines on the same declared stream
|
|
- **THEN** Run MUST persist them in bounded multi-entry batches instead of one durable upload batch per line
|
|
|
|
#### Scenario: Stream changes or bounds are reached
|
|
- **WHEN** a line belongs to another stream or adding it would exceed an aggregation bound
|
|
- **THEN** Run MUST commit the current batch and begin a separate batch without creating a sequence gap
|
|
|
|
### Requirement: Run drains pending log backlog within bounded channel work
|
|
The Run log uploader SHALL continue flushing acknowledged pending log batches while backlog exists, subject to its bounded log-channel work budget, without blocking control, job, or artifact channels.
|
|
|
|
#### Scenario: Backlog is present
|
|
- **WHEN** the spool contains more than one pending log batch
|
|
- **THEN** the uploader MUST attempt consecutive batches until the backlog is drained or its work budget expires
|
|
|
|
#### Scenario: Platform acknowledgement succeeds
|
|
- **WHEN** the platform acknowledges a multi-entry batch range
|
|
- **THEN** Run MUST remove that batch from the spool and advance the acknowledged watermark through the acknowledged sequence
|
|
|
|
### Requirement: Retry compatibility is preserved for old and new spool segments
|
|
The Run spool SHALL retain unacknowledged aggregated batches for retry and SHALL continue to flush existing one-entry segments using the same range acknowledgement semantics.
|
|
|
|
#### Scenario: Run restarts with pending segments
|
|
- **WHEN** Run restarts while old or aggregated log segments remain unacknowledged
|
|
- **THEN** it MUST retry each persisted segment without duplicating or skipping acknowledged sequences
|