Skip to content

Test: Verify CI and Claude workflows#2

Merged
andreasronge merged 2 commits intomainfrom
test/ci-workflow-check
Dec 1, 2025
Merged

Test: Verify CI and Claude workflows#2
andreasronge merged 2 commits intomainfrom
test/ci-workflow-check

Conversation

@andreasronge
Copy link
Copy Markdown
Owner

Summary

  • Updates PtcRunner moduledoc with proper project description

Test plan

  • Verify CI workflow runs (format, compile, credo, test)
  • Verify Claude Code Review workflow triggers with ANTHROPIC_API_KEY

This PR tests the newly added GitHub Actions workflows.

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@andreasronge andreasronge force-pushed the test/ci-workflow-check branch from 0d232c9 to ae5ad46 Compare December 1, 2025 13:17
@andreasronge andreasronge merged commit dc70927 into main Dec 1, 2025
1 of 2 checks passed
@andreasronge andreasronge deleted the test/ci-workflow-check branch December 1, 2025 13:20
andreasronge added a commit that referenced this pull request Dec 1, 2025
…x execution (#10)

* feat: implement Phase 1 core interpreter with JSON parsing and sandbox execution

Implements the foundational Phase 1 of PtcRunner including:

- **Parser**: JSON string and map parsing with error handling
- **Validator**: DSL schema validation for all Phase 1 operations
- **Context**: Variable bindings management
- **Operations**: Core data, control flow, collection, comparison, and aggregation operations
  - Data: literal, load, var
  - Control: pipe
  - Collections: filter, map, select
  - Comparison: eq
  - Aggregations: sum, count
- **Interpreter**: AST evaluation with operation dispatch
- **Sandbox**: Isolated BEAM process execution with timeout and resource monitoring

All programs execute in isolated processes with configurable timeouts and memory limits,
returning execution metrics (duration_ms, memory_bytes).

Includes comprehensive test coverage for all operations, error cases, and edge cases.

Fixes #7

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve PR review issues for validation and sandbox

- Fix validate_list/1: Use Enum.reduce_while instead of Enum.find to properly validate all nested operations (Issue #1)
- Fix sandbox memory limits: Pass max_heap option to Process.spawn to enforce memory limits (Issue #2)
- Add test for nested validation errors: Verify validation catches unknown operations inside pipe steps (Issue #3)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve PR review issues for timeout and memory errors

- Fix timeout error format to match architecture.md: return {:error, {:timeout, timeout_value}} instead of {:error, :timeout}
- Fix memory exceeded error detection: distinguish between memory killed (:killed reason) and timeout kills
- Update sandbox.ex:72-76 to handle :killed reason as memory exceeded with {:error, {:memory_exceeded, max_heap * 8}}
- Update sandbox.ex:82 to return {:error, {:timeout, timeout}} for explicit timeout kills
- Update test case to expect new timeout error format {:timeout, 0} instead of :timeout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update PM status - PR #10 Phase 1 implementation

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
claude bot pushed a commit that referenced this pull request Dec 31, 2025
- Capture fail tool arguments in error message instead of generic "Explicit fail called"
  - Line 233: Replace generic message with `inspect(lisp_step.return)` to preserve failure reason
  - Fixes PR review issue #2: failure data passed to fail tool is now preserved

- Add comment linking to issue #374 for future system prompt enhancements
  - Line 313-314: Document that system prompt is intentionally minimal
  - Reference existing issue #374 for context-aware prompts, tool documentation, etc.
  - Fixes PR review issue #4: clarifies intentional design choice

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
andreasronge pushed a commit that referenced this pull request Dec 31, 2025
* feat: implement Loop.run/2 with response parsing

Implement the core agentic loop that manages LLM↔tool cycles. The loop
calls the LLM, parses PTC-Lisp from the response, executes it, and
continues until return/fail is called or max_turns is exceeded.

**Key Features:**
- Multi-turn execution with LLM feedback loops
- PTC-Lisp extraction from code blocks (clojure/lisp) or raw s-expressions
- System tools (return/fail) for loop termination
- Message history accumulation across turns
- Trace entry generation per turn
- Error feedback to LLM for recovery
- Context merging between turns

**Implementation Details:**
- Detects explicit return/fail calls to terminate loop
- Feeds execution results back to LLM for multi-turn workflows
- Handles max_turns exceeded with appropriate error
- Builds llm_input with system prompt, messages, turn number, and tool names
- Makes previous turn errors available as ctx/fail

**Testing:**
- Comprehensive unit tests for all loop scenarios
- Response parsing tests for different code block formats
- Multi-turn execution tests
- Error handling and recovery tests
- Tool execution tests
- Context and memory tests

Closes #369

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: capture fail tool arguments and add system prompt TODO comment

- Capture fail tool arguments in error message instead of generic "Explicit fail called"
  - Line 233: Replace generic message with `inspect(lisp_step.return)` to preserve failure reason
  - Fixes PR review issue #2: failure data passed to fail tool is now preserved

- Add comment linking to issue #374 for future system prompt enhancements
  - Line 313-314: Document that system prompt is intentionally minimal
  - Reference existing issue #374 for context-aware prompts, tool documentation, etc.
  - Fixes PR review issue #4: clarifies intentional design choice

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
@claude claude bot mentioned this pull request Jan 9, 2026
4 tasks
andreasronge added a commit that referenced this pull request Jan 11, 2026
- Add message-history-optimization-roadmap.md with 24 GitHub issues
- Add migration-guard.md with compile-time enforcement hints
- Add Implementation Phases section with incremental strategy
- Add Cleanup Requirements (CLN-001 to CLN-012)
- Add ARC-011, ARC-012: clarify compression scope vs prompt structure
- Address critical risks:
  - "Blind LLM" gap: #18 prepares only, #22 does atomic switch
  - Breaking demo: #21 dual-write only, #24 does final cleanup
  - PTC-Lisp regressions: #2 requires edge case tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
andreasronge added a commit that referenced this pull request Jan 11, 2026
Issue #603 (Messages stored in Step) was closed on 2026-01-09.
Updated all references in specs and roadmap.

Phase 1 issues (#2-#4) are now unblocked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant