Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/oss_feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: Request an open-source feature for agentic-operator-core.
title: "[OSS] "
labels:
- enhancement
- oss
body:
- type: textarea
id: problem
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@

## Related issues

<!-- Fixes #123, Relates to #456 -->
<!-- Use Fixes #123 only when all acceptance criteria are met. Use Refs #123 for partial progress. -->
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ If your change touches Python runtime code under `agents/`, run `make test-pytho
## Pull Request Guidelines

- Use a clear title and summary of behavior changes.
- Link the related issue (`Fixes #123`).
- Use closing keywords (`Fixes`, `Closes`, `Resolves`) only when the PR satisfies the issue's full acceptance criteria.
- Use `Refs #123` or `Relates to #123` for partial progress.
- Include test evidence (commands and outcomes).
- Avoid unrelated refactors in the same PR.
- Keep reconciliation behavior idempotent.
Expand All @@ -81,6 +82,9 @@ If your change touches Python runtime code under `agents/`, run `make test-pytho

- Use the bug template for defects.
- Use the feature template for enhancement requests.
- Templates apply `bug` or `enhancement` automatically.
- Priorities reflect current phase blockers. Age alone does not determine priority.
- Deferred work closes as not planned, with a scope explanation and a condition for revisiting it.
- Provide reproduction steps and expected behavior.

## Security
Expand All @@ -92,5 +96,7 @@ If your change touches Python runtime code under `agents/`, run `make test-pytho

This repository is the open-source core.

- Include: CRD lifecycle, orchestration, isolation, generic runtime patterns.
- Include: runtime-agnostic governance, workload contracts, runtime adapters, pod isolation, declared egress, and offline-verifiable evidence.
- Supported adapters include Argo, BYO pods, and kagent.
- Generic registries, routing, sidecar buses, and multi-cluster features need a concrete regulated deployment requirement.
- Exclude: proprietary licensing, billing, and private enterprise overlays.
108 changes: 0 additions & 108 deletions agents/tests/test_state.py

This file was deleted.

47 changes: 0 additions & 47 deletions agents/tests/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,30 +152,6 @@ async def test_synthesis_agent_report(sample_state):
print("✅ Report synthesis successful")


def test_workflow_state_structure():
"""Test that state structure matches expectations"""
state: AgentWorkflowState = {
"job_id": "test",
"target_urls": ["https://example.com"],
"status": "running",
"raw_html": {},
"screenshots": {},
"dom_structures": {},
"visual_insights": [],
"competitive_signals": [],
"report_content": None,
"error": None,
"start_time": None,
"end_time": None,
"messages": [],
}

assert state["job_id"] == "test"
assert isinstance(state["target_urls"], list)
assert isinstance(state["raw_html"], dict)
print("✅ State structure valid")


@pytest.mark.asyncio
@pytest.mark.xfail(
reason="LangGraph >=1.0 enforces single-value-per-step on non-Annotated keys; "
Expand Down Expand Up @@ -220,26 +196,3 @@ async def test_full_workflow_execution(sample_state):
assert result["report_content"] is not None

print("✅ Full workflow execution successful")


def test_error_handling():
"""Test error handling in workflow"""
state: AgentWorkflowState = {
"job_id": "error-test",
"target_urls": [], # Empty list
"status": "running",
"raw_html": {},
"screenshots": {},
"dom_structures": {},
"visual_insights": [],
"competitive_signals": [],
"report_content": None,
"error": None,
"start_time": None,
"end_time": None,
"messages": [],
}

# Should handle empty URL list gracefully
assert len(state["target_urls"]) == 0
print("✅ Error handling tested")
14 changes: 0 additions & 14 deletions api/v1alpha1/agentworkload_compatibility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,20 +335,6 @@ func TestAgentWorkloadCompatibility_CRDObjectiveLength(t *testing.T) {
}
}

func TestAgentWorkloadCompatibility_WebhookAcceptsBoundedContextObjective(t *testing.T) {
objective := strings.Repeat("a", 4096)
workload := &AgentWorkload{
Spec: AgentWorkloadSpec{
Objective: &objective,
Agents: []string{"agent1"},
},
}

if err := workload.ValidateCreate(); err != nil {
t.Fatalf("4 KiB objective allowed by the CRD must pass webhook validation: %v", err)
}
}

func TestAgentWorkloadCompatibility_CRDAndWebhookAgreeOnMultibyteObjective(t *testing.T) {
objective := strings.Repeat("é", 32768)
workload := &AgentWorkload{
Expand Down
80 changes: 0 additions & 80 deletions api/v1alpha1/agentworkload_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,42 +132,6 @@ func TestWebhook_RejectEmptyAgents(t *testing.T) {
}
}

func TestWebhook_RejectObjectiveTooLong(t *testing.T) {
longObjective := strings.Repeat("a", 32769)

workload := &AgentWorkload{
Spec: AgentWorkloadSpec{
WorkloadType: stringPtr("generic"),
MCPServerEndpoint: stringPtr("https://localhost:8000"),
Objective: &longObjective,
Agents: []string{"agent1"},
},
}

err := workload.ValidateCreate()
if err == nil {
t.Error("Expected validation error for objective > 32768 characters, got nil")
} else {
t.Logf("Correctly rejected: %v", err)
}
}

func TestWebhook_AcceptsObjectiveAtLimit(t *testing.T) {
objective := strings.Repeat("a", 32768)
workload := &AgentWorkload{
Spec: AgentWorkloadSpec{
WorkloadType: stringPtr("generic"),
MCPServerEndpoint: stringPtr("https://localhost:8000"),
Objective: &objective,
Agents: []string{"agent1"},
},
}

if err := workload.ValidateCreate(); err != nil {
t.Fatalf("objective at 32768-character limit was rejected: %v", err)
}
}

func TestWebhook_ObjectiveLimitCountsUnicodeCharacters(t *testing.T) {
objective := strings.Repeat("é", 32768)
workload := &AgentWorkload{
Expand Down Expand Up @@ -210,50 +174,6 @@ func TestWebhook_AcceptAllWorkloadTypes(t *testing.T) {
t.Log("✅ All workload types accepted")
}

func TestWebhook_DefaultAutoApproveThreshold(t *testing.T) {
workload := &AgentWorkload{
Spec: AgentWorkloadSpec{
WorkloadType: stringPtr("generic"),
MCPServerEndpoint: stringPtr("https://localhost:8000"),
Objective: stringPtr("test objective"),
Agents: []string{"agent1"},
// No AutoApproveThreshold specified
},
}

workload.Default()

if workload.Spec.AutoApproveThreshold == nil {
t.Error("Expected Default() to set AutoApproveThreshold")
} else if *workload.Spec.AutoApproveThreshold != "0.95" {
t.Errorf("Expected default threshold 0.95, got %q", *workload.Spec.AutoApproveThreshold)
} else {
t.Log("✅ Default AutoApproveThreshold set correctly")
}
}

func TestWebhook_DefaultOPAPolicy(t *testing.T) {
workload := &AgentWorkload{
Spec: AgentWorkloadSpec{
WorkloadType: stringPtr("generic"),
MCPServerEndpoint: stringPtr("https://localhost:8000"),
Objective: stringPtr("test objective"),
Agents: []string{"agent1"},
// No OPAPolicy specified
},
}

workload.Default()

if workload.Spec.OPAPolicy == nil {
t.Error("Expected Default() to set OPAPolicy")
} else if *workload.Spec.OPAPolicy != "strict" {
t.Errorf("Expected default policy 'strict', got %q", *workload.Spec.OPAPolicy)
} else {
t.Log("✅ Default OPAPolicy set correctly")
}
}

func TestValidateThreshold(t *testing.T) {
testCases := []struct {
threshold string
Expand Down
Loading
Loading