You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "KatalKavya96 (via GitHub)" <gi...@apache.org> on 2026/07/09 05:28:31 UTC
[PR] fix(bitbucket): tolerate null datacenter comment replies [magpie]
KatalKavya96 opened a new pull request, #792:
URL: https://github.com/apache/magpie/pull/792
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
## Summary
* Hardens Bitbucket Data Center threaded comment normalization when the API returns an explicit `comments: null` value.
* Treats both missing and null nested `comment.comments` fields as no replies by using `raw.get("comments") or []`.
* Adds a regression test for the `comments: null` case so the discussion normalizer does not crash on this payload shape.
## Type of change
* [ ] Skill change (`.claude/skills/<name>/`) — eval fixtures updated below
* [ ] Tool / bridge contract (`tools/<system>/*.md`)
* [x] Python package (`tools/*/` with `pyproject.toml`)
* [ ] Groovy reference impl
* [ ] Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
* [ ] Documentation (`docs/`, `README.md`, `CONTRIBUTING.md`)
* [ ] Project template (`projects/_template/`)
* [ ] CI / dev loop (`prek`, workflows, validators)
* [ ] Other:
## Test plan
* [x] `prek run --all-files` passes
* [x] For Python packages touched: `uv run pytest` / `ruff check` / `mypy` passes
* [ ] For Groovy bridges touched: command-line invocation tested end-to-end
* [ ] For skill changes: eval suite passes for the affected skill
(`PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/`)
* [ ] For skill *behaviour* changes: a new or updated eval fixture is included in this PR
(a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
* [x] Other: verified targeted Bitbucket tests with `PYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py`
## RFC-AI-0004 compliance
* [ ] **HITL** — any new mutation is gated on explicit user confirmation
* [ ] **Sandbox** — no new unrestricted host access; network reach declared in the adapter
* [x] **Vendor neutrality** — keeps the Bitbucket bridge within the existing vendor-neutral `contract:change-request` / partial read-only path without adding new Bitbucket-specific capability prose.
* [ ] **Conversational + correctable** — agentic-override path documented if behaviour is adopter-tunable
* [x] **Write-access discipline** — this is a read-only normalization hardening change and does not add any outbound write or mutation path.
* [ ] **Privacy LLM** — private content does not reach a non-approved LLM; redactor invoked where needed
## Linked issues
Refs #606
## Notes for reviewers
This follows up on the non-blocking robustness note from the merged Bitbucket discussion PR.
Bitbucket Data Center nested replies are already flattened through `_datacenter_comment_tree`; this PR only hardens that path for payloads where the API returns `"comments": null` instead of omitting the field or returning an empty list.
The behaviour is unchanged for normal threaded replies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(bitbucket): tolerate null datacenter comment replies [magpie]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #792:
URL: https://github.com/apache/magpie/pull/792
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(bitbucket): tolerate null datacenter comment replies [magpie]
Posted by "KatalKavya96 (via GitHub)" <gi...@apache.org>.
KatalKavya96 commented on PR #792:
URL: https://github.com/apache/magpie/pull/792#issuecomment-4921862314
Hi @potiuk, this is a quick follow-up fix for the non-blocking robustness suggestion left after the previous Bitbucket discussion PR was merged.
It only hardens _datacenter_comment_tree for the comments: null case and adds a regression test for it. If this looks good, I’d appreciate a quick review/merge so I can move on to the next Bitbucket implementation.
Thanks again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org