Skip to content

style: remove redundant comments and clarify phase labels in automation and tooling#321

Merged
l50 merged 5 commits into
mainfrom
cleanup/strip-step-phase-narration
May 15, 2026
Merged

style: remove redundant comments and clarify phase labels in automation and tooling#321
l50 merged 5 commits into
mainfrom
cleanup/strip-step-phase-narration

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented May 15, 2026

Key Changes:

  • Removed verbose or redundant step and section comments throughout key modules
  • Standardized and clarified phase and step labels in tool output and automation flows
  • Improved readability and conciseness of test and phase labeling logic
  • Updated output formatting for phase transitions in coercion and privilege escalation tooling

Changed:

  • Code comments cleanup - Removed unnecessary or repetitive comments that simply restated code intent in modules such as dedup/labels.rs, orchestrator/automation/adcs_exploitation.rs, orchestrator/automation/stall_detection.rs, orchestrator/state/publishing/credentials.rs, nats.rs, and privesc/trust.rs
  • Phase and step label consistency - Updated phase/step output and test constants in ares-tools/src/coercion.rs and related test code to use concise, consistent labels (e.g., "=== unauth PetitPotam ===" instead of "=== Phase 1: unauth PetitPotam ===")
  • Output formatting improvements - Adjusted multi-step output and error formatting in privilege escalation functions (e.g., certipy_esc3_full_chain, certipy_esc4_full_chain, certipy_esc1_full_chain) for clarity and alignment with updated phase naming
  • Enhanced documentation in output - Refined output strings in cross-realm ticketing and ADCS exploitation to better explain purpose within the output, while removing redundant inline comments

Removed:

  • Redundant and section-divider comments - Eliminated block comments delineating logical sections where they did not provide additional value, improving code readability and maintainability across multiple modules

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 80.41237% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.78%. Comparing base (5282fbe) to head (8136be6).

Files with missing lines Patch % Lines
ares-tools/src/privesc/adcs.rs 77.90% 19 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   78.78%   78.78%           
=======================================
  Files         439      439           
  Lines      124638   124692   +54     
=======================================
+ Hits        98190    98237   +47     
- Misses      26448    26455    +7     
Files with missing lines Coverage Δ
ares-cli/src/dedup/labels.rs 98.11% <ø> (ø)
...i/src/orchestrator/automation/adcs_exploitation.rs 77.16% <100.00%> (ø)
ares-cli/src/orchestrator/automation/laps.rs 92.62% <100.00%> (-0.04%) ⬇️
...cli/src/orchestrator/automation/stall_detection.rs 69.50% <ø> (ø)
...i/src/orchestrator/state/publishing/credentials.rs 89.22% <ø> (ø)
...s-cli/src/orchestrator/state/publishing/domains.rs 99.10% <100.00%> (-0.02%) ⬇️
ares-core/src/nats.rs 76.07% <ø> (ø)
ares-tools/src/coercion.rs 84.51% <100.00%> (-0.11%) ⬇️
ares-tools/src/privesc/trust.rs 73.60% <ø> (ø)
ares-tools/src/privesc/adcs.rs 57.78% <77.90%> (+2.64%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

l50 added 4 commits May 15, 2026 14:09
… consistency

**Changed:**

- Removed redundant or obvious step and phase comments across multiple modules to improve readability without affecting code functionality
- Standardized step and phase output labels in coercion and privilege escalation flows to use consistent, concise terminology (e.g., "Phase 1: unauth PetitPotam" → "unauth PetitPotam", "Step 1: Template Modification" → "Template Modification")
- Updated test constants to match new output labels for phases and steps
- Clarified and shortened instructional output in ADCS exploitation instructions for ESC3
- Minor adjustments to comments for clarity and brevity in trust exploitation routines
- Improved comment clarity regarding optional and required steps, especially where helper scripts are invoked or output filenames must match
…iles

**Changed:**

- Removed commented section headers in `normalize_source_label` for cleaner code in `ares-cli/src/dedup/labels.rs`
- Removed commented test section headers for improved readability in `ares-cli/src/orchestrator/automation/stall_detection.rs`
…S chains

**Added:**

- Introduced `render_chain_output` helper to format chained tool output with labeled headers
- Added unit tests for `render_chain_output` covering concatenation, empty steps, order, and edge cases

**Changed:**

- Updated certipy ADCS chain functions to use `render_chain_output` for consistent output formatting
- Simplified chain output construction by replacing repeated formatting code with the new helper
**Changed:**

- Reformatted lines in test functions to reduce line breaks and improve readability in `laps.rs` and `domains.rs` by combining function arguments onto single lines where appropriate
@l50 l50 force-pushed the cleanup/strip-step-phase-narration branch from 0217caa to 09f96b1 Compare May 15, 2026 20:10
**Changed:**

- Changed S3_BUCKET assignment to use export, ensuring visibility to subprocesses in test.sh
@l50 l50 merged commit 1d75078 into main May 15, 2026
12 checks passed
@l50 l50 deleted the cleanup/strip-step-phase-narration branch May 15, 2026 20:51
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.

1 participant