ATX Bot
a9c7bcf643
Fix: persist catalog classification to DB after GPN failure. Previously, reclassifyDeviceFromCatalog was called but the result was not saved (first persist happened before catalog call). Now: setUnsupported → recordFailure → reclassify via catalog → persist (single createOrUpdate with full snapshot including classified params). All 811 tests pass. Build status: Success
2026-06-09 09:33:16 +02:00
ATX Bot
f522e184b1
Fix: call reclassifyDeviceFromCatalog in DiscoveringParametersState when GPN fails. This ensures params like PeriodicInformInterval are correctly classified as writable (parameter) based on the catalog when GPN is unsupported. All 811 tests pass. Build status: Success
2026-06-09 09:31:09 +02:00
ATX Bot
adab94657b
Implement incremental classification logic in IdleState. Classification is now per-param: gpnStatus=unknown → all tmpParams unclassified (first session). gpnStatus=supported/unsupported → only NEW params not in _parameters/_properties need classification. Removed reclassify from CriticalReadsState and OperationalState. All 811 tests pass. Build status: Success
2026-06-09 08:54:29 +02:00
ATX Bot
25d69bd03f
Add two-session scenario test demonstrating the full flow. Fix OperationalState to also skip reclassify when already classified. Session 1: GPN test → classify → critical reads → inventory GPN→GPV→SPV → ProvCode. Session 2: skip GPN + skip all (1 GPV only). All 811 tests pass. Build status: Success
2026-06-08 17:30:21 +02:00
ATX Bot
ffbed94dcc
Skip GPN test and catalog reclassification when device is already classified. IdleState skips GPN if gpnStatus=supported AND parameters exist. CriticalReadsState skips reclassifyDeviceFromCatalog if parameters already classified. Avoids unnecessary RPCs on subsequent sessions. All 809 tests pass. Build status: Success
2026-06-08 17:26:44 +02:00
ATX Bot
2cdb11ce25
IdleState now extracts parent paths from Inform parameters for GPN test. This classifies Inform params (writable vs read-only) and tests GPN support in one step. Falls back to data model root path if no Inform params available. All 791 tests pass. Build status: Success
2026-06-08 17:19:31 +02:00
ATX Bot
59fe7f1022
Fix session flow: 1) IdleState sends single GPN test (ManagementServer. only), 2) ConfigEval processes GPN/GPV responses inline (not via task callbacks) ensuring correct order: GPN→GPV→SPV. Updated all affected tests. All 785 tests pass. Build status: Success
2026-06-08 17:16:00 +02:00
Kevin L'Hereec
ec7e66555d
fix
2026-06-08 16:54:37 +02:00
Kevin L'Hereec
44f7d9acfc
fix
2026-06-08 16:46:38 +02:00
Kevin L'Hereec
dae82eeff2
fix
2026-06-08 16:35:33 +02:00
Kevin L'Hereec and Continue
08c620ee68
fix: drain task queue on session completion to stop orphan CWMP requests
...
After OperationalState, the state machine was marked completed but leftover
tasks in the CWMPTaskQueue (queued by ConfigurationEvaluationState callbacks)
were being served to the CPE on subsequent empty POSTs via the continue()
task fallback path, causing spurious GetParameterNames + SetParameterValues
exchanges after the session officially ended.
Fix: call taskQueue.clearPendingTasksForDevice() in completeMachine() so no
tasks bleed into the next session.
Generated with [Continue](https://continue.dev )
Co-Authored-By: Continue <noreply@continue.dev >
2026-06-08 14:20:59 +00:00
Kevin L'Hereec and Continue
7540327689
fix: process GPN response in DiscoveringParametersState
...
The GPN response (ParameterInfoStruct list) was received but never
processed — organizeParameters() was never called, so discovered
parameters were lost and gpnStatus was never set to 'supported'.
Now on each successful GPN response:
- device.organizeParameters() is called to store leaf params/props
- device.setGpnStatus('supported') marks the device as GPN-capable
This fixes: parameters not showing in UI, wrong dataModel detection,
and PeriodicInformInterval not appearing after SPV.
Generated with [Continue](https://continue.dev )
Co-Authored-By: Continue <noreply@continue.dev >
2026-06-08 14:13:09 +00:00
Kevin L'Hereec and Continue
aad93911e4
feat: TR-069 CWMP state machine hardening + exchange viewer improvements
...
- TR-069 CWMP state machine hardening (14 phases): shared event utility,
multi-event routing, GPN circuit breaker, IdleState GPN guard, expanded
GPN fault codes, CriticalReadsState, ConfigEval GPN guard, task queue
race condition fix, explicit error handling, terminal states
(OperationalState/PartialOperationalState), consolidated reclassify,
crash pattern detection, removed enqueueImmediate, state flow wiring
- Fix SOAP Fault not processed by state machine (soap-env:Fault detection)
- Fix GPN circuit breaker not persisting after session drops
- Fix CriticalReadsState GPV response parsing (xsi:type normalization)
- Fix CriticalReadsState not processing GPV response values
- Skip SPV when device is already compliant (ProvisioningCode check)
- Add Device.DeviceInfo.ModelName to critical reads GPV
- Fix TypeError on DeviceDetail parameters view (null guards)
- Log empty 204 responses in exchange trace UI
- TR-181 catalog: type corrections and new entries (+6640 lines)
- SequenceViewer: replace session-nav buttons with compact dropdown select
- SequenceViewer: fix CPE/ACS lifeline headers wrapping to 2 lines
- Add 20 unit tests for state machine fixes (SOAP Fault, GPN circuit
breaker, CriticalReads, stale session, ConfigEval/ComplianceUpdate skips)
Generated with [Continue](https://continue.dev )
Co-Authored-By: Continue <noreply@continue.dev >
2026-06-08 12:49:00 +00:00
Kevin L'Hereec
dabe15839d
fix: handle GPN Fault in DiscoveringParametersState
...
When the CPE responds with a CWMP Fault to GetParameterNames,
mark gpnStatus as 'unsupported' and continue to ConfigurationEvaluationState
instead of hanging the session.
2026-06-03 15:56:33 +02:00
Kevin L'Hereec
0c83a4ccb2
feat: TR-069 Exchange Viewer - structured MongoDB storage with SSE streaming and sequence diagram UI
...
- MongoDB storage: cwmp_exchanges collection with indexes (deviceId+timestamp, deviceId+sequenceNumber unique, TTL 24h)
- ExchangeStoreService: CWMP method extraction, per-device queue for ordering, retry logic, message cap (5000/device)
- Exchange API: GET/DELETE/SSE stream endpoints with Last-Event-ID reconnection
- CwmpLoggerMiddleware: dual-write (MongoDB + legacy files) with fire-and-forget
- Frontend: SequenceViewer (CPE↔ACS lifelines, arrows, auto-scroll, virtual scroll) + InspectorPanel (formatted XML, copy, syntax highlighting)
- Tr069Trace page: integrated new viewer with col-6/col-6 layout
- DeviceDetail page: collapsible exchange section when device is traced
- 14 property-based tests, 40+ unit tests, 5 integration tests
- Health check includes index verification
- Config: feature flags, SSE timeouts, retry policy
2026-06-03 15:52:44 +02:00
Kevin L'Hereec
478439783d
feat: catalog type enrichment + typed compliance comparison
...
- Add type field to all 7727 entries in tr181-catalog.json (xsd:string/unsignedInt/boolean/int)
- reclassifyDeviceFromCatalog applies catalog type when device type is UNKNOWN
- Export getCatalogType() utility
- Compliance comparison: numeric types compared as Number, boolean as bool, fallback to String
- Handle NaN gracefully (fallback to string comparison)
2026-06-03 08:53:31 +02:00
Kevin L'Hereec
ce4a857bb1
fix: compliance comparison uses String() to handle number vs string mismatch
2026-06-02 18:29:10 +02:00
Kevin L'Hereec
e857b4fbe7
feat: reference providers system with Wassup integration
...
- Pluggable multi-provider architecture (ReferenceEngine)
- Wassup provider implementation (HTTP GET + X_WASSUP_USER_IP)
- Auto-resolve references on Inform (BOOT/BOOTSTRAP events)
- References displayed in device Identity card
- REST API: GET/POST references per device
- Config via config/references.json
- Fix event extraction for single EventStruct and numeric EventCodes
- Mock Wassup provisioned by home-device-simulator on device creation
2026-06-02 15:52:16 +02:00
Kevin L'Hereec
4eb3f0795a
feat: immediate mode (I) commands via Connection Request
...
- Hide Refresh button when ConnectionRequestURL is unavailable
- Fix ImmediateCommandStateMachine session lifecycle (mark complete when no commands)
- Fix preemption: new CONNECTION REQUEST replaces stale immediate session
- Protect ensureSessionForRemote from rebinding to completed machines
- Normalize numeric event codes from simulators (6 -> 6 CONNECTION REQUEST)
- Extract updatePendingCommandsStatus for clarity
2026-06-02 14:00:31 +02:00
Kevin L'Hereec
bc9ac4f125
fix: state machine timing + reclassification tests
...
- Fix state machine start timing: don't call start() in startStateMachine,
let the CPE's first empty body trigger the state machine via continue().
This ensures GPN is sent at the correct point in the TR-069 session.
- Add unit tests for reclassifyDeviceFromCatalog (10 tests)
- Add unit tests for MainStateMachine transitions and GPN callbacks (11 tests)
- Test both scenarios: Huawei (GPN supported) and Livebox (GPN unsupported + fallback)
- Fix tr069_trace_service test path assertion (config/ → data/)
- Update steering doc with Livebox bootstrap command
2026-06-01 17:31:33 +02:00
Kevin L'Hereec
a5b3135396
ok maybe
2026-06-01 16:58:52 +02:00
Kevin L'Hereec
ea73e91aa4
trace + backup propertie
2026-06-01 16:20:58 +02:00
Kevin L'Hereec
b3b1edec17
ok
2026-06-01 15:49:09 +02:00
Kevin L'Hereec and Copilot
6082a0e610
feat: TR-069 per-device SOAP trace logging + log viewer UI
...
- Remove SOAP from Docker stdout; route to per-device trace files only
- Fix trace service paths using process.cwd() (/app/data/, /app/logs/tr069/)
- Fix Docker volume permissions: dedicated /app/data & /app/logs/tr069 dirs
- Add GET /api/v1/tr069-trace/:id/log endpoint (tail N lines)
- Rewrite Tr069Trace.vue: clickable rows, dark log viewer, 3s auto-refresh
- Add simulator-ui-env.js to public/ (remove from config/)
- TR-181/InternetGatewayDevice dataModel auto-detection
- Parameter writability config with W/R fallback default
- Fix device_action_executor for GetParameterNames detection flow
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-06-01 14:33:44 +02:00
Kevin L'Hereec and Copilot
847da1cdf5
feat: per-device TR-069 SOAP trace logging
...
- Tr069TraceService: in-memory Map O(1) lookup, Promise-queue per device
for sequential file writes, 10MB rotation (5 files kept)
- config/tr069-trace.json: persisted list of traced devices (atomic write)
- CwmpLoggerMiddleware: buffers request+response, writes to device log file
after next() once ctx.cwmpDeviceId is set by controller
- CwmpController: sets ctx.cwmpDeviceId on all code paths (Inform + others)
- StateMachineManager: getHashIdForRemote() for non-Inform messages
- REST API: GET/POST/DELETE /api/v1/tr069-trace
- UI: Tr069Trace Vue page with device search, add/remove tracing
- 8 new unit tests (192 total, all passing)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-06-01 12:07:07 +02:00
Kevin L'Hereec and Copilot
aff8e14a63
feat: compliance report + auto-versioning for configurations
...
- Add ComplianceStatus.PENDING and configVersion to DeviceComplianceInfo
- Add ComplianceReport + ComplianceDeviceResult types to ConfigurationEngine
- Expose evaluateSpecific() as public (used by compliance + dry-run)
- Add complianceReport() method: filter matching devices, evaluate each
- Fix matchesCriteria: skip parameterCriteria entries with null/empty name
- Fix getDeviceParameterValue: fallback to plain object arrays (DeviceRecord)
- Fix findDevice: support lookup by both identifier and deviceId.id
- ConfigurationService.update: version is now auto-managed (no user input)
- behavioral changes (criteria/params/policy/priority/…) → patch bump
- bumpType field allows 'patch' | 'minor' | 'major'
- cosmetic changes (name/tags) → no bump
- Add sanitizeCriteria: filter null/empty parameterCriteria names silently
- Add isBehavioralChange helper
- Add DeviceModel.resetComplianceForConfiguration call on behavioral update
- Add ConfigurationModel.distinctTags() + controller endpoint GET /tags
- Add controller endpoint GET /configurations/:id/compliance
- Add DeviceModel.getDistinctValues for inventory fields
- Fix unit tests: mock DeviceModel, remove obsolete version-validation test
- Add 14 new unit tests (engine: 5, service: 9)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-06-01 11:32:17 +02:00
Kevin L'Hereec and Copilot
b8ff4b68a7
feat: TR-181 parameter writability resolution
...
- Add GpnStatus type ('supported' | 'unsupported' | 'unknown') to Device domain
- Persist gpnStatus in DeviceRecord and all 3 persist paths
(cwmp_controller, main_state_machine, device_action_executor)
- Capture Fault 9000/9001 in getParameterNames → mark device as 'unsupported'
- Fix GPN NextLevel flag: false (non-recursive shallow scan)
- Add static TR-181 catalog (7 727 params, sourced from BBF cwmp-data-models)
- Add parameter_writability service with resolveWritability():
supported → live data; unsupported → catalog → default R/W;
unknown → catalog → null (genuinely unknown)
- Add scripts/generate-tr181-catalog.mjs to regenerate catalog from BBF XML
- Add design doc: docs/design-parameter-writability.md
- Add unit tests: 26 tests covering normalizePath and all gpnStatus branches
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-06-01 11:25:15 +02:00
Kevin L'Hereec and Copilot
d1c65dbf1e
chore: initial commit — AdonisJS v7 TR-069 ACS
...
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim)
- AdonisJS v7 app with Inertia.js + Vue 3
- MongoDB integration
- CWMP/TR-069 state machine engine
- Configuration engine with compliance tracking
- Branding: ADAM ACS (favicon, navbar, locales)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-29 16:46:37 +02:00