Skip to content

Tech-debt remediation: lib/bin split + D1–D5 resolved#37

Merged
hyperpolymath merged 6 commits into
mainfrom
fix/tech-debt-remediation
May 17, 2026
Merged

Tech-debt remediation: lib/bin split + D1–D5 resolved#37
hyperpolymath merged 6 commits into
mainfrom
fix/tech-debt-remediation

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Executes the full docs/TECHNICAL_DEBT.md 30-day plan (CAP order: corrective → adaptive → perfective).

Resolved

  • D1 Service registry: fixed env-driven set; wired service_list + service_set_url; removed vestigial register/unregister stubs.
  • D2 8 dead-code warnings: wired settings_save, llm_coding_system_resources (+ /proc/stat CPU sampler); removed WorkspaceLock/PendingAction/SpawnRequest.task_list.
  • D3 Unit tests: 23 passing via cargo test --lib (GTK-free).
  • D4 Coprocessor: real libloading dlopen+copro_init/copro_dispatch/copro_free (was no-op stubs).
  • D5 TECHNICAL_DEBT.md rewritten from a stale 2024 placeholder into a verified executed plan; broken arch link fixed.

Architectural change

  • Lib/bin split: new [lib] panll (GTK-free) holds all testable logic; main.rs keeps only system_tray (needs gossamer_rs). This is what makes the suite runnable without linking libgossamer/GTK/WebKit.
  • The previously orphaned coprocessor (declared by no crate root, never compiled) is now wired in and tested.

Gates

  • cargo test --lib: 23/23 pass
  • cargo clippy --all-targets -- -D warnings: clean (0)
  • ⚠️ Binary link still requires GTK/WebKit + libgossamer (pre-existing env gap; see TECHNICAL_DEBT.md "Environment Caveat").

Follow-up debt opened (see TECHNICAL_DEBT.md)

  • F1 ~38 orphaned directories under src-gossamer/src/ — addressed in a follow-up commit on this branch.
  • F2 Wire coprocessor async commands into the binary IPC table.
  • F3 Document/containerise the GTK dev environment.

🤖 Generated with Claude Code

hyperpolymath and others added 6 commits May 17, 2026 12:55
…es cmds, drop speculative scaffolding

D1: service registry is a fixed env-driven set; wire service_list
(get_registry) + service_set_url (update_service_url); remove vestigial
register/unregister command stubs (no backing fns).
D2: wire settings_save + llm_coding_system_resources (read_system_memory
+ SystemResources + new CPU sampler); remove unused WorkspaceLock,
PendingAction, SpawnRequest.task_list. clippy -D warnings clean.
D5: rewrite TECHNICAL_DEBT.md as verified 30-day plan; fix arch link.
Also de-Tauri'd llm_coding/commands.rs header (Gossamer).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add libloading 0.8 dep (once_cell already present). FfiState now owns
the loaded libloading::Library; copro_load_ffi does a real dlopen +
copro_init; copro_ffi_dispatch resolves copro_dispatch/copro_free from
the live handle and calls the C ABI (was a stub). Symbols resolved
per-call (no self-referential 'static storage). De-Tauri'd coprocessor
comments. Removed stale libloading/once_cell TODOs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ssor (D3)

Add [lib] panll target (GTK-free): http_client, service_registry,
settings, identity, groove, llm_coding + the previously-orphaned
coprocessor (declared by no crate root → never compiled; D4's FFI fix
now actually builds and is tested). main.rs keeps only system_tray
(gossamer_rs/GTK) and imports the rest via use panll::*.

cargo test --lib now runs WITHOUT linking libgossamer/GTK: 18/18 pass
(6 new D3 tests for http_client + service_registry, 12 coprocessor).
Cleared 11 latent clippy lints surfaced once coprocessor compiled
(10 empty-line-after-doc, 1 should_implement_trait — justified allow).
clippy --all-targets -D warnings clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… (W4)

- Fold cross-module integration tests into the lib test surface so they
  run via cargo test --lib (no GTK bin build): 23/23 pass.
- Reconcile .github/hypatia-rules/panll-v0.2.0-fixes.yml v1->v2: retire 8
  stale panic-attack rules that false-positive on now-correct code; keep
  one precise regression guard (panll-cmd-disabled); fix doc-ref path.
- CHANGELOG.md: document lib/bin split, coprocessor wiring, add/remove/fix.
- TECHNICAL_DEBT.md: mark D1-D5 resolved with execution log; record
  honest environment caveat (bin link needs GTK) and follow-up debt
  F1 (40 orphaned dirs) / F2 (coprocessor IPC wiring) / F3 (dev env).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ead code

Inspection showed every 'orphan' dir is a real PanLL panel backend
(aerie/hypatia/ai/farm/provenance/…), orphaned by the same defect as
coprocessor. Decision: integrate, not delete. Added F1 integration
workstream plan (coprocessor pilot → census → bulk wire).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 7ebf0fd into main May 17, 2026
0 of 21 checks passed
@hyperpolymath hyperpolymath deleted the fix/tech-debt-remediation branch May 17, 2026 13:32
@sonarqubecloud
Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request May 17, 2026
* docs(adr): ADR-0001 panel-clades pivot + freeze src-gossamer legacy (P0)

Pin down decisions surfaced during tech-debt remediation:
- SoT = panel-clades (Idris2 ABI + Zig FFI + a2ml clades); estate-conformant
- src-gossamer Rust = FROZEN LEGACY (STATUS.adoc marker); PR #37 = interim
  legacy-stabilisation only
- Reference = Axiom.jl's backend-organisation APPROACH (the pattern, not
  its coprocessor code); oo7/jtv experimental, out of scope
- Backend set (11): FPGA DSP math physics tensor vector I/O audio neural
  crypto quantum
- panel-clades found to be a spec-complete but UNINSTANTIATED template
  shell (rsr {{placeholders}}, just init never run)
- GATE: characterise + re-validate Axiom.jl's approach before any
  downstream clade/backend build (no speculative work)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(adr): trust only Axiom.jl general form; non-conforming code = presumed mess

Per owner guidance: do not look at oo7/jtv at all; any coprocessor/
backend code not resembling the Axiom.jl general form is presumed
bot-mess / interference / incomplete and is NOT reference material.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: characterise Axiom.jl general form + gate re-validation verdict

Cloned hyperpolymath/Axiom.jl; characterised the standard backend-
organisation approach in docs/architecture/AXIOM-GENERAL-FORM.adoc
(AbstractBackend taxonomy + SmartBackend per-op dispatch + AcceleratorGate
device selection + Idris2-spec/Zig-authoritative split + bidirectional
host bridge + parity/smoke CI).

Re-validation: Idris2 ABI typechecks clean (0.8.0); Zig FFI main.zig
FAILS — 17 'Axiom.jl_*' invalid identifiers from a bad token-substitution
bot (should be 'axiom_*'; header/tests/README clean; design sound; trivial
repair). Same corruption class also in panel-clades/ffi/zig/. ADR-0001
gate: PASSED with caveat (pattern+spec trusted; P2 build gated on the
Axiom.jl de-corruption landing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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