ADORSYS-GIS / ADORSYS-GIS/lightbridge-governance

[Ticket]: Split app/governance-ctl/src/sync.rs (1178 LoC)

Offen
#178 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
ticket
Vorherrschende Sprache
Rust
Sterne
1
Forks
2
Ø Merge
14 Std. 36 Min.
Gemergte PRs (30 T.)
107

Beschreibung

### Type

Refactor

### Summary

`app/governance-ctl/src/sync.rs` is 1178 lines. Split it along its real seams to bring every resulting file under 200.

### Intent

It is one of the largest files in the repository and, at this size, is skimmed rather than reviewed.

### Source of truth (links)

- #162 (parent epic), #173 (baseline)

### Acceptance Criteria

1. No resulting file exceeds 200 LoC.
2. **Behaviour is unchanged** — the existing tests pass before and after, unmodified.
3. No test is weakened, deleted or made less specific to accommodate the split.
4. Module boundaries follow a real seam, not an arbitrary line count.
5. Public API unchanged, or the change is called out explicitly.

### Out of Scope

Behaviour changes of any kind. This is a pure refactor.

### Technical Context

The copilot-sync command. Seams: fetch, parse, upsert, manifest bookkeeping.

### Risks

⚠️ A shrinking file that also shrinks its assertions is a regression wearing a refactor's clothes. Reviewers should diff the test count and the assertion count, not just the line count.

### Test Plan

The existing suite, unmodified, before and after. If a test needed changing, say why in the PR — that is the signal worth reviewing.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Read app/governance-ctl/src/sync.rs and the linked baseline #173; map the fetch, parse, upsert, and manifest-bookkeeping seams, then run the existing suite before changing anything. Split only along those seams while preserving the public API and tests. Done means every resulting file is under 200 LoC, behavior is unchanged, and test and assertion counts are unchanged.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
cli
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
57/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.