Skip to content

fix(lint): keep deployment_ledger.py under the 2100-line guard (main red) - #4878

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-ledger-budget-fix
Nov 23, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-ledger-budget-fix

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Main is red on the Lint file-length guard (.github/actions/lint-chain/action.yml, MAX_LINES=2100): src/apm_cli/core/deployment_ledger.py reached 2101 lines when the #4802 revert (#4855) and #4818 landed together (main d656ff3).

This PR writes the restored DeploymentMaterializationSession._encode call on one formatted line (# fmt: skip), the same shape the code had before the revert. The file goes to 2095 lines. There is no behavior change and the budget is not raised.

Issue and approved scope

Issue: Refs #4855

Human scope-approval comment: main-red fix under the regent's main-red owner ruling (02:1x); OPS acked compaction with no behavior change and no budget raise.

Does this PR complete the issue, or what remains? It restores green Lint on main; nothing remains.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Validation evidence:

  • wc -l src/apm_cli/core/deployment_ledger.py: 2095 (main: 2101).
  • uvx [email protected] check src/apm_cli/core/deployment_ledger.py: passed.
  • uvx [email protected] format --check src/apm_cli/core/deployment_ledger.py: passed.
  • The rest runs in CI (rule 17(g): local runs are ruff-only).

Changelog

  • One fragment per section, changelog.d/<pr>.<section>.md, holding
    one line: user-visible effect first, 25 words or fewer, ending with
    (#PR); breaking changes only under upgrade notes; no Highlights; no
    new lines under ## [Unreleased]. See changelog.d/README.md and
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

Not applicable.

The #4802 revert (#4855) and #4818 landed together and took the file to
2101 lines. The restored _encode call takes one formatted line, as it
did before the revert; no behavior change.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the deployment ledger formatting change.

No open issues 🎉

What changed in this PR

This formatting-only change addresses the deployment ledger's file-length lint failure after #4855 and #4818 landed together, without changing runtime behavior or raising the limit.

Changes:

  • Compacts the _encode call while preserving all arguments.
  • Adds # fmt: skip to retain the single-line layout, reducing the file from 2101 to 2095 lines.
File Description
src/​apm_cli/​core/​deployment_ledger.py Compacts _encode to bring the file below the 2100-line guard.

Review effort: Balanced

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