-
Notifications
You must be signed in to change notification settings - Fork 33
Add Flow.usingChannel #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This commit ports Flow.usingChannel from jox to ox (issue #396). Flow.usingChannel creates a Flow by providing a Sink (channel) that can be written to asynchronously. The method: - Creates a channel and forks a task to run the provided function - Automatically closes the channel on completion or error - Propagates elements from the channel to downstream flow stages Also includes comprehensive tests covering basic usage, error propagation, transformations, and concurrent sending. Co-authored-by: Adam Warski <adamw@users.noreply.github.com>
|
@claude can you also update the docs, as in the original jox pr, in the flows.md file? |
|
Claude finished @adamw's task in 1m 10s —— View job Documentation UpdateI've added documentation for Tasks
Changes MadeAdded a new section in
The documentation follows the same pattern as the existing --- | Branch |
Co-authored-by: Adam Warski <adamw@users.noreply.github.com>
|
@claude the build is failing |
|
Claude finished @adamw's task in 2m 6s —— View job Build Failure FixedTasks
Root CauseThe build was failing because two files weren't formatted properly according to scalafmt (140 character line limit):
Changes Made
The changes have been committed and pushed. The CI should pass now. --- | Branch |
- Split long comment line in Flow.scala - Reformat usingChannel method signature in FlowCompanionOps.scala Co-authored-by: Adam Warski <adamw@users.noreply.github.com>
|
@claude can't you just run scalafmt on the checkedout repository? it still fails |
|
Claude finished @adamw's task in 1m 28s —— View job Running scalafmtTasks
SummaryFixed the scalafmt formatting issue in Note: I was unable to run The CI should now pass - the scalafmt check will verify that all files are properly formatted. --- | Branch |
Co-authored-by: Adam Warski <adamw@users.noreply.github.com>
|
@claude How to fix the claude github action so that running things doesn't require approval? it's a sandbox anyway |
|
Claude finished @adamw's task in 1m 28s —— View job How to Fix Claude GitHub Action Approval RequirementsTasks
AnswerThe approval prompts you're seeing are part of Claude Code's security model. To run commands like However, I cannot modify the workflow file directly because the GitHub App permissions don't allow changes to What You Need to DoEdit - name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
timeout_minutes: 60
claude_args: |
--allowedPrompts "Bash:run scalafmt,Bash:install dependencies,Bash:run tests,Bash:build the project"How It WorksThe
Security ConsiderationsSince this runs in a GitHub Actions sandbox with limited repository permissions, pre-approving common development commands is safe:
Alternative: More Permissive ConfigurationIf you want to allow all common development operations without individual approvals: claude_args: |
--allowedPrompts "Bash:run build tools,Bash:run formatters,Bash:run linters,Bash:run tests,Bash:install dependencies"This covers most development workflows while still maintaining some control over what types of commands Claude can execute. |
Ports
Flow.usingChannelfrom jox to ox as requested in issue #396.Changes
Flow.usingChannelmethod to create flows with a provided SinkFixes #396
Generated with Claude Code