feat: implement ISSUE-WP-0005 connector mapping and scope alignment
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Container Image / build-and-push (push) Successful in 1m22s

Add MappingService (work_record_uuid ↔ external id), project/map CLI with
outward push-status, optional TaskSpec work_record fields, boundary-sync
policy, and packaging/capability framing cleanup. Mark WP-0005 finished.
This commit is contained in:
tegwick 2026-07-22 00:25:06 +02:00
parent 6855fb2a32
commit f88e9a28fe
16 changed files with 1300 additions and 179 deletions

View file

@ -27,9 +27,9 @@ class TestCLICommands:
"""Test main CLI help displays correctly."""
result = self.runner.invoke(cli, ['--help'])
assert result.exit_code == 0
assert 'Universal Issue Tracking System' in result.output
assert 'issue list' in result.output
assert 'issue show' in result.output
assert 'External issue-tracker connector' in result.output
assert 'project' in result.output
assert 'map' in result.output
def test_backend_list_command(self):
"""Test backend list command."""
@ -121,35 +121,39 @@ class TestCLICommands:
result = self.runner.invoke(cli, ['--version'])
assert result.exit_code == 0
@patch('issue_core.cli.utils.get_backend')
@patch('issue_core.cli.commands.get_backend')
def test_list_command_basic(self, mock_get_backend):
"""Test basic list command functionality."""
# This test will help us identify the existing bug
from issue_core.core.models import Issue, IssueState
from datetime import timezone
mock_backend = Mock()
# Create mock issues
mock_issue1 = Mock()
mock_issue1.number = 1
mock_issue1.title = "First Issue"
mock_issue1.state.value = "open"
mock_issue2 = Mock()
mock_issue2.number = 2
mock_issue2.title = "Second Issue"
mock_issue2.state.value = "closed"
mock_backend.list_issues.return_value = [mock_issue1, mock_issue2]
now = datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
mock_backend.list_issues.return_value = [
Issue(
id="1",
number=1,
title="First Issue",
description="",
state=IssueState.OPEN,
created_at=now,
updated_at=now,
),
Issue(
id="2",
number=2,
title="Second Issue",
description="",
state=IssueState.CLOSED,
created_at=now,
updated_at=now,
),
]
mock_get_backend.return_value = mock_backend
result = self.runner.invoke(cli, ['list'])
# This might fail due to the existing bug, which is what we want to identify
if result.exit_code != 0:
print(f"List command failed with: {result.output}")
print(f"Exception: {result.exception}")
# We expect this to work properly after fixes
assert result.exit_code == 0 or "'Sentinel' object has no attribute 'lower'" in str(result.exception)
assert result.exit_code == 0, result.output
assert "First Issue" in result.output
class TestBackendConfiguration: