Skip to content

Fix metrics doc drift and counters.sh shell prologue#892

Merged
ptr727 merged 1 commit into
developfrom
fix/metrics-doc-and-counters-shell
Jul 25, 2026
Merged

Fix metrics doc drift and counters.sh shell prologue#892
ptr727 merged 1 commit into
developfrom
fix/metrics-doc-and-counters-shell

Conversation

@ptr727

@ptr727 ptr727 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Two review findings surfaced on the open develop -> main promotion (#884), both real and both on runtime-metrics content already merged to develop. Fixing them on develop so the promotion carries the fix rather than the defect.

1. ARCHITECTURE.md described the pre-operation-weighted model

The Runtime Metrics subsection still said progress is "byte-weighted" and "weighted by input bytes (summed once up front and credited at completion)" - the behavior before #869. The current model is operation-weighted: each heavy full-file operation counts the file's size as work when it starts and when it finishes, and the total grows as operations are discovered rather than being summed up front. That is what README, HISTORY, and Metrics.cs describe; ARCHITECTURE.md was the one place the old prose survived the #869 sweep. Both the progress.ratio label and the weighting bullet are corrected.

2. Docker/counters.sh used the short shell prologue

set -euo pipefail -> set -Eeuo pipefail, per the Workflow YAML Conventions shell rule (committed .sh scripts start with the full -Eeuo so a later ERR trap inherits).

Verification

markdownlint-cli2, editorconfig-checker, shellcheck (counters.sh), cspell (README/HISTORY), husky pre-commit gate all clean. ARCHITECTURE.md CRLF, counters.sh LF preserved. No byte-weighted / summed once up front prose remains anywhere. No C# changed.

Two review findings on the runtime-metrics content:

- ARCHITECTURE.md described the progress model as byte-weighted, summed
  once up front and credited at file completion - the pre-operation-weighted
  behavior. The current model (operation-weighted, total grows as heavy
  operations are discovered, credited per operation) is what README, HISTORY,
  and Metrics.cs implement, so align the architecture prose to it.
- Docker/counters.sh used set -euo pipefail; committed shell scripts use the
  full set -Eeuo pipefail per the Workflow YAML Conventions shell rule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates PlexCleaner’s documentation and Docker helper script to match the current runtime-metrics behavior and the repository’s bash prologue convention, so the next develop -> main promotion carries the corrected prose and script semantics.

Changes:

  • Fix ARCHITECTURE.md runtime-metrics prose to describe the operation-weighted progress.ratio model (not the older byte-weighted/up-front-summed model).
  • Update Docker/counters.sh to use set -Eeuo pipefail (enabling ERR trap inheritance via -E).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Docker/counters.sh Switch bash prologue to set -Eeuo pipefail while keeping bash shebang and behavior intact.
ARCHITECTURE.md Correct runtime-metrics documentation to align with the operation-weighted progress model described elsewhere.

@ptr727
ptr727 merged commit ca71183 into develop Jul 25, 2026
16 checks passed
@ptr727
ptr727 deleted the fix/metrics-doc-and-counters-shell branch July 25, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants