job-workflow 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbf6231d334745f4814282d93fa8c7b54461680e6bb57edc6632cd39b86cb71b
4
- data.tar.gz: c627082defb65e2a4cd79cb2b88d3f54ce8b082a88d9ccaff3d96029ee49ea65
3
+ metadata.gz: '08ad79c285a78a258aaafdf2cca6141982291f52c00a7c95412a7df728f96217'
4
+ data.tar.gz: 4fba62aa4a507ab75f8fb33ac21b1fadaa409452f985be9e1eedff0a010a3614
5
5
  SHA512:
6
- metadata.gz: f8caf717541c7f549d3957a5939d636881f8ad98389e5e53759dde43e561c8bbdeda0211feab0843f2625fbc974fb217b479bc2421e0bc828b9f6d910b749cd5
7
- data.tar.gz: 466d87d40597d0d3c68de4cec3f2f6d158faab74100d098420cd376108fb88667f15cf1ecccdf2b810e41df402a9db5f7d84945a71de2dd756e71ae99588fe58
6
+ metadata.gz: 5b079b1bb1b534b9952de0b431d6fac1658e9581ea30d22cbe5b0737e7c7748f78af68a46880500d8c3da9edc51bf5b4e558adf568ae1f0ce014cf77bd336ab8
7
+ data.tar.gz: fc2a98038a737cd4bc47c4f029bc2df17d55ec6d2ce16ca031f14a84cce8ac5a9418f20b18fc8174a2e157b74488557e4335bbed9afe71582141adc97ea28a00
@@ -0,0 +1,38 @@
1
+ # Coding Style
2
+
3
+ ## Primary sources of truth
4
+
5
+ - `.rubocop.yml` for Ruby style, complexity, and naming constraints
6
+ - `Steepfile`, `rbs_collection.yaml`, and inline RBS usage for type-checking expectations
7
+ - `.github/copilot-instructions.md` for repository-specific design and testing rules
8
+
9
+ ## Mechanical style constraints
10
+
11
+ - Ruby string literals use double quotes.
12
+ - RuboCop line length is capped at 120 characters.
13
+ - The repository excludes `examples/**/*` from the root RuboCop config because the example app validates itself separately.
14
+
15
+ ## Design rules
16
+
17
+ - Keep code small and focused on a single responsibility.
18
+ - Prefer composable behavior over large monolithic methods.
19
+ - Favor immutable workflow inputs through `Arguments`.
20
+ - Use `Output` as the main way to communicate task side effects and downstream data.
21
+ - Preserve clear boundaries between `Workflow`, `Task`, and `Runner`.
22
+ - Avoid breaking public APIs without a documented migration or deprecation path.
23
+
24
+ ## Type and signature rules
25
+
26
+ - Prefer `rbs-inline` comments in implementation files when type information changes.
27
+ - Do not edit generated `.rbs` files or `sig/` artifacts directly unless maintainers explicitly approve it.
28
+
29
+ ## Test-adjacent implementation rules
30
+
31
+ - Add only the code necessary for the requested behavior and its directly related fixes.
32
+ - Reuse existing helpers and patterns before adding new abstractions.
33
+ - Comment code only when the behavior is non-obvious.
34
+ - Do not change established naming conventions without approval.
35
+
36
+ ## Unconfirmed items
37
+
38
+ - Any additional hand-written naming rules beyond Ruby conventions and RuboCop enforcement
@@ -0,0 +1,37 @@
1
+ # Domain
2
+
3
+ ## Repository purpose
4
+
5
+ JobWorkflow is a workflow orchestration library for Ruby on Rails applications. It provides a declarative DSL on top of ActiveJob so applications can define task graphs, dependencies, fan-out work, retries, throttling, and monitoring.
6
+
7
+ ## Core concepts
8
+
9
+ - `Workflow`: the ordered graph of tasks for a job class
10
+ - `Task`: one unit of work in a workflow, optionally depending on other tasks
11
+ - `Arguments`: immutable workflow inputs exposed to tasks through `Context`
12
+ - `Context`: the task-facing object used to read arguments, outputs, runtime helpers, and execution state
13
+ - `Output`: the structured result store for completed task outputs
14
+ - `Runner`: the orchestration layer that executes tasks and updates workflow state
15
+ - `SubTaskJob`: the dedicated async job class used for `enqueue: true` fan-out work
16
+ - `WorkflowStatus` / `JobStatus`: read models for workflow and sub-task execution state
17
+ - Monitoring UI: the Rails engine that visualizes workflow definitions and execution DAGs
18
+
19
+ ## Common terminology
20
+
21
+ - `each task`: a task that fans out over a collection
22
+ - `dependency_wait`: waiting behavior for dependent async work
23
+ - `fan-out`: splitting work into sub-jobs
24
+ - `root execution`: the top-level workflow job, excluding sub-task jobs
25
+
26
+ ## Detailed references
27
+
28
+ - `guides/GETTING_STARTED.md` for the high-level workflow model
29
+ - `guides/DSL_BASICS.md` for task definitions and dependency rules
30
+ - `guides/TASK_OUTPUTS.md` for output flow and downstream consumption
31
+ - `guides/PARALLEL_PROCESSING.md` for fan-out and aggregation behavior
32
+ - `guides/WORKFLOW_STATUS_QUERY.md` for workflow vs job status read models
33
+ - `guides/MONITORING_UI.md` for the monitoring view of root executions and sub-task jobs
34
+
35
+ ## Unconfirmed items
36
+
37
+ - Additional external domain vocabulary used by downstream adopters
@@ -0,0 +1,44 @@
1
+ # Environment
2
+
3
+ ## Required local tools
4
+
5
+ - Ruby and Bundler for gem development
6
+ - SQLite3 for local development and the example app
7
+ - A shell environment that can run the root and example-app Rake tasks
8
+
9
+ ## Root setup
10
+
11
+ ```bash
12
+ bin/setup
13
+ bundle install
14
+ bundle exec rake rbs:install
15
+ ```
16
+
17
+ ## Example app setup
18
+
19
+ From `examples/rails_8_1/`:
20
+
21
+ ```bash
22
+ bundle install
23
+ bundle exec rails db:prepare
24
+ bundle exec rake rbs:install
25
+ ```
26
+
27
+ ## Running the example app
28
+
29
+ - Start the Rails server from `examples/rails_8_1/` with `bin/rails server`
30
+ - Start background job processing with `bin/jobs`
31
+ - Open `/job_workflow` for the monitoring UI and `/jobs` for Mission Control Jobs in the example app
32
+ - For a denser monitoring DAG preview, enqueue `AcceptanceComplexMonitoringDagJob` from `examples/rails_8_1/`
33
+
34
+ ## Useful notes
35
+
36
+ - The example app is the main place to verify real monitoring UI behavior.
37
+ - The example app has its own lockfile and validation commands; treat it as an additional maintained surface.
38
+ - Use `examples/rails_8_1/README.md` for the full preview sequence.
39
+ - Use `guides/GETTING_STARTED.md` for first-time library setup and `guides/MONITORING_UI.md` for monitoring behavior.
40
+
41
+ ## Unconfirmed items
42
+
43
+ - Preferred Ruby version manager for maintainers
44
+ - Any editor or shell configuration the team expects
@@ -0,0 +1,29 @@
1
+ # General
2
+
3
+ ## Core behavior
4
+
5
+ - Respond to repository collaborators in Japanese, even though these agent resource files are written in English.
6
+ - Interpret user instructions literally and keep changes scoped to the requested task.
7
+ - Ask for clarification before making risky, ambiguous, or behavior-changing edits.
8
+ - Prefer existing repository conventions over personal defaults.
9
+
10
+ ## Always do
11
+
12
+ - Read the relevant repository context before editing.
13
+ - Keep changes focused and avoid unrelated cleanup.
14
+ - Report what changed, what was validated, and any unresolved points when finishing work.
15
+
16
+ ## Do not do
17
+
18
+ - Do not create unrelated refactors while working on a user request.
19
+ - Do not assume undocumented behavior when repository sources do not confirm it.
20
+ - Do not treat generated signatures in `sig/generated/` as the primary editing surface.
21
+
22
+ ## Communication
23
+
24
+ - Use concise Japanese in user-facing chat.
25
+ - State uncertainty explicitly instead of presenting guesses as facts.
26
+
27
+ ## Unconfirmed items
28
+
29
+ - Additional organization-wide communication rules beyond this repository
@@ -0,0 +1,20 @@
1
+ # Security
2
+
3
+ ## Secrets and sensitive data
4
+
5
+ - Do not commit API keys, tokens, passwords, private keys, or other secrets.
6
+ - Stop and ask if a value looks like a secret or production credential.
7
+
8
+ ## Restricted operations
9
+
10
+ - Do not modify files outside the repository root.
11
+
12
+ ## Dependency and code safety
13
+
14
+ - Prefer existing repository dependencies and tools over introducing new ones.
15
+ - Avoid risky shell operations, destructive git commands, and history rewriting unless explicitly requested.
16
+ - Surface errors instead of silently swallowing them.
17
+
18
+ ## Unconfirmed items
19
+
20
+ - External secret-management system used by maintainers
@@ -0,0 +1,43 @@
1
+ # Structure
2
+
3
+ ## Repository layout
4
+
5
+ ```text
6
+ .
7
+ ├── app/ # Rails engine assets for the monitoring UI
8
+ ├── bin/ # executable helpers
9
+ ├── config/ # Rails engine and routing configuration
10
+ ├── examples/rails_8_1/ # acceptance Rails application used to verify integration
11
+ ├── guides/ # user-facing documentation
12
+ ├── lib/ # main JobWorkflow library code
13
+ ├── sig/ # generated signatures and type artifacts
14
+ ├── sig-private/ # private type definitions used by Steep
15
+ ├── spec/ # main RSpec suite
16
+ ├── .agents/instructions/ # agent instructions files referenced from AGENTS.md
17
+ └── AGENTS.md # root agent entry point
18
+ ```
19
+
20
+ ## Key areas
21
+
22
+ - `lib/job_workflow/` holds the core DSL, runtime, adapters, monitoring models, and version file.
23
+ - `lib/job_workflow/monitoring/` contains monitoring presenters, registries, and layout helpers.
24
+ - `app/` and `config/routes.rb` support the monitoring UI engine.
25
+ - `examples/rails_8_1/` is a separate validation surface with its own Rake tasks, lockfile, and specs.
26
+ - `examples/rails_8_1/app/jobs/` contains acceptance workflow definitions.
27
+ - `examples/rails_8_1/spec/jobs/` contains acceptance and integration-oriented example-app specs.
28
+ - `guides/` is the documentation index for feature and operational guides.
29
+
30
+ ## Structure expectations
31
+
32
+ - Treat this repository as a single package with an embedded example application, not as a monorepo of independent packages.
33
+ - Keep agent-wide documentation at the root unless a future task explicitly introduces subdirectory-specific AGENTS.md files.
34
+
35
+ ## Documentation entry points
36
+
37
+ - Start with `guides/README.md` to find the right feature guide.
38
+ - Use `guides/MONITORING_UI.md` for monitoring-specific behavior.
39
+ - Use `examples/rails_8_1/README.md` for example-app setup and preview flows.
40
+
41
+ ## Unconfirmed items
42
+
43
+ - Whether additional future example applications should get their own AGENTS.md
@@ -0,0 +1,40 @@
1
+ # Tech Stack
2
+
3
+ ## Languages and frameworks
4
+
5
+ - Ruby `>= 3.1.0` for the gem runtime
6
+ - Rails and ActiveJob for the workflow runtime and monitoring engine integration
7
+ - Solid Queue in the example app for asynchronous execution scenarios
8
+ - SQLite in local and example-app development flows
9
+ - RBS Inline plus Steep for type checking
10
+ - RSpec for tests
11
+ - RuboCop with repository plugins for linting
12
+ - SimpleCov for 100% line and branch coverage enforcement
13
+
14
+ ## Primary commands
15
+
16
+ - Root validation:
17
+ - `bundle exec rake spec`
18
+ - `bundle exec rake lint`
19
+ - `bundle exec rake typecheck`
20
+ - Useful root helpers:
21
+ - `bundle exec rake lint:fix`
22
+ - `bundle exec rake lint:fixall`
23
+ - `bundle exec rake rbs:install`
24
+ - `bundle exec rake rbs:update`
25
+ - `bundle exec rake rbs:inline`
26
+ - Example app validation from `examples/rails_8_1/`:
27
+ - `bundle exec rake spec`
28
+ - `bundle exec rake lint`
29
+ - `bundle exec rake typecheck`
30
+
31
+ ## Architecture summary
32
+
33
+ - `Workflow`, `Task`, `Runner`, `Arguments`, `Context`, and `Output` form the core execution model.
34
+ - Queue adapters isolate runtime-specific job lookup and persistence behavior.
35
+ - Monitoring code lives under `lib/job_workflow/monitoring/` and is rendered through the Rails engine in `app/`.
36
+ - The example Rails app is the main integration harness for real ActiveJob and Solid Queue behavior.
37
+
38
+ ## Important command rule
39
+
40
+ - Use the repository Rake tasks instead of calling `rspec`, `rubocop`, or `steep` directly for final validation.
@@ -0,0 +1,46 @@
1
+ # Testing
2
+
3
+ ## Required validation
4
+
5
+ - Every functional change must include new or updated specs that cover the changed behavior.
6
+ - Root repository changes must pass:
7
+ - `bundle exec rake spec`
8
+ - `bundle exec rake lint`
9
+ - `bundle exec rake typecheck`
10
+ - Root coverage must remain at `100%` line coverage and `100%` branch coverage.
11
+
12
+ ## Example app validation
13
+
14
+ - If a change touches `examples/rails_8_1/`, also run inside that directory:
15
+ - `bundle exec rake spec`
16
+ - `bundle exec rake lint`
17
+ - `bundle exec rake typecheck`
18
+ - Example app coverage must also stay at `100%` line coverage and `100%` branch coverage.
19
+
20
+ ## Validation scope
21
+
22
+ - If the change only touches root library, engine, guides, or specs outside `examples/rails_8_1/`, run the root validation set.
23
+ - If the change touches both root code and `examples/rails_8_1/`, run both validation sets.
24
+ - If the change alters behavior, update the relevant guide examples as well as tests.
25
+
26
+ ## Test-writing rules
27
+
28
+ - Use `bundle exec rake spec`, not `bundle exec rspec`.
29
+ - Define a named subject with `subject(:name)`.
30
+ - Keep `describe` / `context` nesting at three levels or fewer.
31
+ - Prefer one expectation per example unless a matcher like `have_attributes` or a combined matcher makes the assertion a single behavior check.
32
+ - Test through public APIs only; do not use `instance_variable_set`, `instance_variable_get`, or similar reflection in specs.
33
+ - Keep `let` usage lean and split contexts when conditions differ.
34
+
35
+ ## Completion rule
36
+
37
+ - Do not report a code change as ready until the required validation commands for the touched surfaces have succeeded.
38
+
39
+ ## Reference material
40
+
41
+ - Use `guides/TESTING_STRATEGY.md` for testing guidance beyond the mandatory checks.
42
+ - Use `guides/MONITORING_UI.md` and feature-specific guides when behavior-oriented expectations need clarification.
43
+
44
+ ## Unconfirmed items
45
+
46
+ - Whether any additional external CI jobs run outside the repository-local Rake tasks
@@ -0,0 +1,39 @@
1
+ # Workflow
2
+
3
+ ## Branches
4
+
5
+ - Use a dedicated branch for work.
6
+ - Preferred branch prefixes are `feature/<short-desc>` and `fix/<short-desc>`.
7
+
8
+ ## Commits
9
+
10
+ - Use Conventional Commits in `type(scope): short summary` format.
11
+ - Valid types include `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, and `perf`.
12
+ - Keep the subject line within 72 characters.
13
+ - Update `CHANGELOG.md` before creating a commit when the change should be reflected in release notes.
14
+
15
+ ## Pull requests
16
+
17
+ - Keep one PR focused on one logical change.
18
+ - PR creation and merge are normally done by the user unless they explicitly delegate that step.
19
+ - A completion handoff should include validation results, coverage, lint status, typecheck status, major changed files, and any recommended follow-up.
20
+
21
+ ## Before changing behavior
22
+
23
+ - Check `guides/README.md` first to find the relevant feature guide.
24
+ - Use feature guides such as `guides/DSL_BASICS.md`, `guides/TASK_OUTPUTS.md`, `guides/PARALLEL_PROCESSING.md`, `guides/DEPENDENCY_WAIT.md`, and `guides/MONITORING_UI.md` before changing semantics in those areas.
25
+
26
+ ## Release preparation
27
+
28
+ - Record shipped changes in `CHANGELOG.md`, starting from `## [Unreleased]` before they are cut into a release section.
29
+ - Keep version-related files in sync when preparing a release.
30
+
31
+ ## Review expectations
32
+
33
+ - Explain why a change is necessary.
34
+ - Keep PRs small enough to review without mixing unrelated work.
35
+
36
+ ## Unconfirmed items
37
+
38
+ - Reviewer assignment rules outside the repository instructions
39
+ - Whether release tagging always happens from `main`
data/AGENTS.md ADDED
@@ -0,0 +1,23 @@
1
+ # AGENTS.md
2
+
3
+ This repository uses AGENTS.md as a thin hub. Read the required instructions files before making changes.
4
+
5
+ ## Required instructions
6
+
7
+ - @.agents/instructions/general.md
8
+ - @.agents/instructions/structure.md
9
+ - @.agents/instructions/tech-stack.md
10
+ - @.agents/instructions/security.md
11
+ - @.agents/instructions/testing.md
12
+ - @.agents/instructions/workflow.md
13
+
14
+ ## Load when needed
15
+
16
+ - .agents/instructions/domain.md — JobWorkflow concepts and terminology
17
+ - .agents/instructions/environment.md — local setup and example app workflow
18
+ - .agents/instructions/coding-style.md — design rules, style constraints, and implementation patterns
19
+
20
+ ## Repository notes
21
+
22
+ - Repository-specific reusable agent assets should live under `.agents/skills/`.
23
+ - No subdirectory-level AGENTS.md files are defined at the moment. Use this root entry point unless a later task adds a more specific AGENTS.md.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.1] - 2026-06-01
4
+
5
+ ### Fixed
6
+
7
+ - Fix monitoring UI task state rendering so tasks recorded as completed in ActiveJob continuation data no longer appear as `pending` when they have no outputs or sub-task statuses
8
+
3
9
  ## [0.6.0] - 2026-05-24
4
10
 
5
11
  ### Added
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # JobWorkflow
2
2
 
3
- > ⚠️ **Early Stage (v0.6.0):** This library is in active development. APIs and features may change in breaking ways without notice. Use in production at your own risk and expect potential breaking changes in future releases.
3
+ > ⚠️ **Early Stage (v0.6.1):** This library is in active development. APIs and features may change in breaking ways without notice. Use in production at your own risk and expect potential breaking changes in future releases.
4
4
 
5
5
  ## Overview
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Production Deployment
2
2
 
3
- > ⚠️ **Early Stage (v0.6.0):** JobWorkflow is still in early development. While this section outlines potential deployment patterns, please thoroughly test in your specific environment and monitor for any issues before relying on JobWorkflow in critical production systems.
3
+ > ⚠️ **Early Stage (v0.6.1):** JobWorkflow is still in early development. While this section outlines potential deployment patterns, please thoroughly test in your specific environment and monitor for any issues before relying on JobWorkflow in critical production systems.
4
4
 
5
5
  This section covers suggested settings and patterns for running JobWorkflow in production-like environments.
6
6
 
data/guides/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # JobWorkflow Guides
2
2
 
3
- > ⚠️ **Early Stage (v0.6.0):** JobWorkflow is in active development. APIs and features may change. The following guides provide patterns and examples for building workflows, but be aware that implementations may need adjustment as the library evolves.
3
+ > ⚠️ **Early Stage (v0.6.1):** JobWorkflow is in active development. APIs and features may change. The following guides provide patterns and examples for building workflows, but be aware that implementations may need adjustment as the library evolves.
4
4
 
5
5
  Welcome to the JobWorkflow documentation! This directory contains comprehensive guides to help you build robust workflows with JobWorkflow.
6
6
 
@@ -87,16 +87,17 @@ module JobWorkflow
87
87
  #: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Symbol
88
88
  def task_status(task_name, task_outputs, task_job_statuses)
89
89
  return :failed if task_job_statuses.any?(&:failed?)
90
- return :succeeded if completed_task?(task_outputs, task_job_statuses)
90
+ return :succeeded if completed_task?(task_name, task_outputs, task_job_statuses)
91
91
  return :running if task_running?(task_name, task_job_statuses)
92
92
 
93
93
  :pending
94
94
  end
95
95
 
96
- #: (Array[TaskOutput], Array[TaskJobStatus]) -> bool
97
- def completed_task?(task_outputs, task_job_statuses)
96
+ #: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> bool
97
+ def completed_task?(task_name, task_outputs, task_job_statuses)
98
98
  return true if !running? && task_outputs.any?
99
99
  return task_job_statuses.all?(&:succeeded?) if task_job_statuses.any?
100
+ return true if status.completed_task_names.include?(task_name)
100
101
 
101
102
  task_outputs.any?
102
103
  end
@@ -141,12 +142,7 @@ module JobWorkflow
141
142
  end
142
143
 
143
144
  #: (Symbol) -> [Array[TaskOutput], Array[TaskJobStatus]]
144
- def task_state(task_name)
145
- [
146
- status.output.fetch_all(task_name:),
147
- status.job_status.fetch_all(task_name:)
148
- ]
149
- end
145
+ def task_state(task_name) = [status.output.fetch_all(task_name:), status.job_status.fetch_all(task_name:)]
150
146
 
151
147
  #: (Task) -> Hash[Symbol, untyped]
152
148
  def task_configuration(task)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobWorkflow
4
- VERSION = "0.6.0" # : String
4
+ VERSION = "0.6.1" # : String
5
5
  end
@@ -10,6 +10,7 @@ module JobWorkflow
10
10
  attr_reader :context #: Context
11
11
  attr_reader :job_class_name #: String
12
12
  attr_reader :status #: status_type
13
+ attr_reader :completed_task_names #: Array[Symbol]
13
14
 
14
15
  class << self
15
16
  #: (String) -> WorkflowStatus
@@ -36,11 +37,21 @@ module JobWorkflow
36
37
  workflow = job_class._workflow
37
38
  context = context_from_job_data(data, workflow)
38
39
 
39
- new(context:, job_class_name:, status: data["status"])
40
+ new(
41
+ context:,
42
+ job_class_name:,
43
+ status: data["status"],
44
+ completed_task_names: completed_task_names_from_job_data(data)
45
+ )
40
46
  end
41
47
 
42
48
  private
43
49
 
50
+ #: (Hash[String, untyped]) -> Array[Symbol]
51
+ def completed_task_names_from_job_data(data)
52
+ Array(data.dig("continuation", "completed")).map(&:to_sym)
53
+ end
54
+
44
55
  #: (Hash[String, untyped], Workflow) -> Context
45
56
  def context_from_job_data(data, workflow)
46
57
  context_data = data["job_workflow_context"] || data["arguments"]&.first&.dig("job_workflow_context")
@@ -64,11 +75,17 @@ module JobWorkflow
64
75
  end
65
76
  end
66
77
 
67
- #: (context: Context, job_class_name: String, status: status_type) -> void
68
- def initialize(context:, job_class_name:, status:)
78
+ #: (
79
+ # context: Context,
80
+ # job_class_name: String,
81
+ # status: status_type,
82
+ # ?completed_task_names: Array[Symbol]
83
+ # ) -> void
84
+ def initialize(context:, job_class_name:, status:, completed_task_names: [])
69
85
  @context = context #: Context
70
86
  @job_class_name = job_class_name #: String
71
87
  @status = status #: Symbol
88
+ @completed_task_names = completed_task_names
72
89
  end
73
90
 
74
91
  #: () -> Symbol?
@@ -6,7 +6,7 @@ gems:
6
6
  source:
7
7
  type: git
8
8
  name: ruby/gem_rbs_collection
9
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
9
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
10
10
  remote: https://github.com/ruby/gem_rbs_collection.git
11
11
  repo_dir: gems
12
12
  - name: activerecord
@@ -14,7 +14,7 @@ gems:
14
14
  source:
15
15
  type: git
16
16
  name: ruby/gem_rbs_collection
17
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
17
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
18
18
  remote: https://github.com/ruby/gem_rbs_collection.git
19
19
  repo_dir: gems
20
20
  - name: activesupport
@@ -22,7 +22,7 @@ gems:
22
22
  source:
23
23
  type: git
24
24
  name: ruby/gem_rbs_collection
25
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
25
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
26
26
  remote: https://github.com/ruby/gem_rbs_collection.git
27
27
  repo_dir: gems
28
28
  - name: base64
@@ -34,7 +34,7 @@ gems:
34
34
  source:
35
35
  type: git
36
36
  name: ruby/gem_rbs_collection
37
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
37
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
38
38
  remote: https://github.com/ruby/gem_rbs_collection.git
39
39
  repo_dir: gems
40
40
  - name: concurrent-ruby
@@ -42,7 +42,7 @@ gems:
42
42
  source:
43
43
  type: git
44
44
  name: ruby/gem_rbs_collection
45
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
45
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
46
46
  remote: https://github.com/ruby/gem_rbs_collection.git
47
47
  repo_dir: gems
48
48
  - name: connection_pool
@@ -50,7 +50,7 @@ gems:
50
50
  source:
51
51
  type: git
52
52
  name: ruby/gem_rbs_collection
53
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
53
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
54
54
  remote: https://github.com/ruby/gem_rbs_collection.git
55
55
  repo_dir: gems
56
56
  - name: date
@@ -74,7 +74,7 @@ gems:
74
74
  source:
75
75
  type: git
76
76
  name: ruby/gem_rbs_collection
77
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
77
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
78
78
  remote: https://github.com/ruby/gem_rbs_collection.git
79
79
  repo_dir: gems
80
80
  - name: i18n
@@ -82,7 +82,7 @@ gems:
82
82
  source:
83
83
  type: git
84
84
  name: ruby/gem_rbs_collection
85
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
85
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
86
86
  remote: https://github.com/ruby/gem_rbs_collection.git
87
87
  repo_dir: gems
88
88
  - name: json
@@ -98,7 +98,7 @@ gems:
98
98
  source:
99
99
  type: git
100
100
  name: ruby/gem_rbs_collection
101
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
101
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
102
102
  remote: https://github.com/ruby/gem_rbs_collection.git
103
103
  repo_dir: gems
104
104
  - name: monitor
@@ -138,7 +138,7 @@ gems:
138
138
  source:
139
139
  type: git
140
140
  name: ruby/gem_rbs_collection
141
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
141
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
142
142
  remote: https://github.com/ruby/gem_rbs_collection.git
143
143
  repo_dir: gems
144
144
  - name: stringio
@@ -162,7 +162,7 @@ gems:
162
162
  source:
163
163
  type: git
164
164
  name: ruby/gem_rbs_collection
165
- revision: 81fa8bd0617286078617a62b6a3229cebfd4af23
165
+ revision: 3f5e8df1ce89ea06067fa42263012c968b4e583e
166
166
  remote: https://github.com/ruby/gem_rbs_collection.git
167
167
  repo_dir: gems
168
168
  - name: uri
@@ -50,8 +50,8 @@ module JobWorkflow
50
50
  # : (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Symbol
51
51
  def task_status: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Symbol
52
52
 
53
- # : (Array[TaskOutput], Array[TaskJobStatus]) -> bool
54
- def completed_task?: (Array[TaskOutput], Array[TaskJobStatus]) -> bool
53
+ # : (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> bool
54
+ def completed_task?: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> bool
55
55
 
56
56
  # : (Symbol, Array[TaskJobStatus]) -> bool
57
57
  def task_running?: (Symbol, Array[TaskJobStatus]) -> bool
@@ -13,6 +13,8 @@ module JobWorkflow
13
13
 
14
14
  attr_reader status: status_type
15
15
 
16
+ attr_reader completed_task_names: Array[Symbol]
17
+
16
18
  # : (String) -> WorkflowStatus
17
19
  def self.find: (String) -> WorkflowStatus
18
20
 
@@ -22,14 +24,22 @@ module JobWorkflow
22
24
  # : (Hash[String, untyped]) -> WorkflowStatus
23
25
  def self.from_job_data: (Hash[String, untyped]) -> WorkflowStatus
24
26
 
27
+ # : (Hash[String, untyped]) -> Array[Symbol]
28
+ private def self.completed_task_names_from_job_data: (Hash[String, untyped]) -> Array[Symbol]
29
+
25
30
  # : (Hash[String, untyped], Workflow) -> Context
26
31
  private def self.context_from_job_data: (Hash[String, untyped], Workflow) -> Context
27
32
 
28
33
  # : (Hash[String, untyped]) -> Hash[String, untyped]?
29
34
  private def self.workflow_arguments_data: (Hash[String, untyped]) -> Hash[String, untyped]?
30
35
 
31
- # : (context: Context, job_class_name: String, status: status_type) -> void
32
- def initialize: (context: Context, job_class_name: String, status: status_type) -> void
36
+ # : (
37
+ # context: Context,
38
+ # job_class_name: String,
39
+ # status: status_type,
40
+ # ?completed_task_names: Array[Symbol]
41
+ # ) -> void
42
+ def initialize: (context: Context, job_class_name: String, status: status_type, ?completed_task_names: Array[Symbol]) -> void
33
43
 
34
44
  # : () -> Symbol?
35
45
  def current_task_name: () -> Symbol?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: job-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - shoma07
@@ -31,8 +31,18 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - ".agents/instructions/coding-style.md"
35
+ - ".agents/instructions/domain.md"
36
+ - ".agents/instructions/environment.md"
37
+ - ".agents/instructions/general.md"
38
+ - ".agents/instructions/security.md"
39
+ - ".agents/instructions/structure.md"
40
+ - ".agents/instructions/tech-stack.md"
41
+ - ".agents/instructions/testing.md"
42
+ - ".agents/instructions/workflow.md"
34
43
  - ".rspec"
35
44
  - ".rubocop.yml"
45
+ - AGENTS.md
36
46
  - CHANGELOG.md
37
47
  - LICENSE.txt
38
48
  - README.md