Repository navigation
feat(#904, #903): arrêt et abandon d'une capture en direct par l'API - #925
Open
MathildeDec wants to merge 1 commit into
Open
MathildeDec wants to merge 1 commit into
MathildeDec wants to merge 1 commit into
Conversation
… bpf_library par point
- POST /live-captures/{id}/stop attend la création de l'analyse et renvoie
son analysis_id (borné par STOP_WAIT_SECONDS)
- DELETE /live-captures/{id} : abandon sans analyse (tshark arrêté, fichiers
supprimés, statut cancelled) ; 409 si la capture est terminée
- champ bpf_library par point (bibliothèque de #906), exclusif avec bpf :
annoncé par docs/parite-surfaces.md mais pas encore branché
- #903 (durée bornée, 400 au-delà) déjà livrée par #902 : tests dédiés
- parite des surfaces, api-rest, guide API, openapi.yaml ; 13 tests
Couverture de tests (delta vs
|
| Métrique | Base (dev) |
PR | Δ |
|---|---|---|---|
| Couverture | 80.6 % | 80.5 % | -0.1 pt |
| Instructions couvertes | 23850/30157 | 23850/30191 | +0 |
| Branches couvertes | 7487/8726 | 7487/8742 | +0 |
Seuil bloquant : 80.0 % (fail_under, #246), marge 0.5 pt.
This was referenced Oct 13, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #904. Closes #903.
#904
POST /live-captures/{capture_id}/stopattend que l'analyse soit créée (le temps d'arrêter tshark) et renvoie sonanalysis_id, comme demandé par l'issue. Attente bornée à 15 s ; sans effet sur une capture terminée.DELETE /live-captures/{capture_id}: abandon sans analyse. Les enregistreurs sont arrêtés, les fichiers supprimés, le statut passe àcancelledet le serveur redevient libre. 409 si la capture est déjà terminée.#903
La borne de
duration(NETCROSS_API_LIVE_MAX_DURATION, 300 s par défaut, refus 400 au-delà) était déjà livrée par #902 (#920). Cette PR ajoute des tests dédiés et la mention dans la parité des surfaces.En plus :
bpf_librarypar pointdocs/parite-surfaces.mdannonçait un champbpf_librarypar point de capture, mais il n'était branché nulle part. Il l'est désormais viaresolve_bpf_libraryde #906 (nom insensible à la casse, 400 si introuvable, exclusif avecbpf).Vérifications
tests/test_issue_904_live_stop_cancel.py, sur les fixtures de API : capture en direct sur interfaces, un filtre BPF par point (équiv. --live) #902).pytest --cov: 5579 passés ; ruff, mypy, lint-imports, openapi, diagramme verts.api-rest.md, guide API.