Skip to content

feat: dynamic dci skip condition#863

Merged
louise-poole merged 11 commits intomainfrom
ag/feat/ENG-5302-dynamic-dci-skip-condition
Mar 6, 2026
Merged

feat: dynamic dci skip condition#863
louise-poole merged 11 commits intomainfrom
ag/feat/ENG-5302-dynamic-dci-skip-condition

Conversation

@ElusAegis
Copy link
Contributor

No description provided.

ElusAegis and others added 3 commits February 26, 2026 13:44
Replace hardcoded DCI protocol list with dynamic detection via the
protocol_systems RPC endpoint.

Key changes:
- Add `dci_protocols` field to ProtocolSystemsRequestResponse DTO
- Thread DCI info from ExtractorConfig.dci_plugin through ServicesBuilder → RpcHandler
- Add `uses_dci` flag to ProtocolStateSynchronizer, replacing hardcoded list
- Client fetches DCI info at startup and sets flag per synchronizer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce ProtocolSystemsInfo struct with fetch() and log_other_available()
methods, shared by both TychoStreamBuilder and CLI.

Key changes:
- Extract fetch + classify logic into ProtocolSystemsInfo::fetch()
- Fix CLI flow that was missing uses_dci propagation
- Remove duplicated protocol systems fetching from cli.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded page_size=100 with
ProtocolSystemsRequestBody::effective_max_page_size().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

To run Claude review, comment /review or /claude-review on this PR.

@ElusAegis
Copy link
Contributor Author

/claude-review

@claude
Copy link
Contributor

claude bot commented Feb 27, 2026

Claude finished @ElusAegis's task in 3m 11s —— View job


Review

Two issues found — one potential correctness bug, one silent data truncation.

  • Read changed files
  • Analyze code changes
  • Post inline comments

ElusAegis and others added 3 commits February 27, 2026 12:33
Intersect dci_protocols with the actual systems returned from the DB
so phantom entries (e.g. misconfigured extractor names) don't cause
unnecessary get_traced_entry_points calls on the client side.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use .values() instead of .iter() when discarding map keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Log a warning when the server reports more protocol systems than were
fetched on page 0, so operators know availability info may be incomplete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ElusAegis ElusAegis force-pushed the ag/feat/ENG-5302-dynamic-dci-skip-condition branch from 7064712 to 117a9c9 Compare February 27, 2026 12:37
ElusAegis and others added 2 commits February 27, 2026 12:44
fixup! fix: Resolve clippy::iter_kv_map lints for nightly 1.95

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Collaborator

@louise-poole louise-poole left a comment

Choose a reason for hiding this comment

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

This change was long overdue and is so useful! Thanks 🙏

ElusAegis and others added 2 commits March 2, 2026 13:05
When the server hasn't been updated yet, dci_protocols deserialises as
empty, causing clients to skip entrypoint fetches for DCI protocols.
Fall back to the hardcoded list when the server returns no DCI info.

Key changes:
- Add LEGACY_DCI constant with previously hardcoded protocol names
- Apply fallback only when server returns empty dci_protocols
- Tagged with TODO(ENG-5302) for removal after server rollout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses review feedback: the protocol_systems endpoint should return
active extractors from config, not from the DB. This avoids returning
protocols whose extractors have been deactivated.

Key changes:
- Add protocol_systems field to ServicesBuilder and RpcHandler
- Rewrite get_protocol_systems to paginate the config list directly
- Update test to verify config-based response (no DB mock needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove redundant `expected_dci` case arg — use `dci_protocols` directly
for the assertion since it already captures the expected value.

Key changes:
- Drop second rstest case argument from both test cases
- Remove `expected_dci` parameter from test function signature
- Clone `dci_protocols` before move so assertion can still use it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Tycho Mar 6, 2026
@louise-poole louise-poole merged commit cfe164c into main Mar 6, 2026
8 checks passed
@louise-poole louise-poole deleted the ag/feat/ENG-5302-dynamic-dci-skip-condition branch March 6, 2026 10:30
@github-project-automation github-project-automation bot moved this from In Progress to Done in Tycho Mar 6, 2026
propellerci bot pushed a commit that referenced this pull request Mar 6, 2026
## [0.146.0](0.145.2...0.146.0) (2026-03-06)

### Features

* dynamic dci skip condition ([#863](#863)) ([cfe164c](cfe164c))
* Dynamic DCI skip condition for entrypoint requests ([3645481](3645481))

### Bug Fixes

* add legacy DCI fallback for backward compatibility ([784df4a](784df4a))
* Filter dci_protocols against DB-returned protocol systems ([45027a9](45027a9))
* Resolve clippy::iter_kv_map lints for nightly 1.95 ([aa47e4e](aa47e4e))
* serve protocol_systems from config instead of DB ([2f6be95](2f6be95))
* Use PaginationLimits trait for protocol_systems page size ([dd7c56a](dd7c56a))
* Warn when protocol_systems response is truncated by pagination ([117a9c9](117a9c9))
@propellerci
Copy link

propellerci bot commented Mar 6, 2026

This PR is included in version 0.146.0 🎉

@propellerci propellerci bot added the true label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants