Skip to content

Commit 680cbd5

Browse files
committed
feat: adjustments from code review
1 parent 58b945d commit 680cbd5

3 files changed

Lines changed: 20 additions & 15 deletions

File tree

crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ impl RemoteRuntime for NATSRemoteRuntime {
3434
Ok(r) => r,
3535
Err(err) => {
3636
log::error!(
37-
"RemoteRuntimeExeption: failed to handle NATS message: {}",
37+
"RemoteRuntimeException: failed to handle NATS message: {}",
3838
err
3939
);
4040
return Err(RuntimeError::new(
4141
"T-PROV-000001",
42-
"RemoteRuntimeExeption",
42+
"RemoteRuntimeException",
4343
"Failed to receive any response messages from a remote runtime.",
4444
));
4545
}
@@ -50,22 +50,22 @@ impl RemoteRuntime for NATSRemoteRuntime {
5050
Ok(r) => match r.node_result {
5151
Some(res) => Ok(res),
5252
None => {
53-
log::error!("RemoteRuntimeExeption: recieved execution result without an body");
54-
return Err(RuntimeError::new(
53+
log::error!("RemoteRuntimeException: received execution result without a body");
54+
Err(RuntimeError::new(
5555
"T-PROV-000003",
56-
"RemoteRuntimeExeption",
57-
"Recieved empty action execution response",
58-
));
56+
"RemoteRuntimeException",
57+
"Received empty action execution response",
58+
))
5959
}
6060
},
6161
Err(err) => {
6262
log::error!(
63-
"RemoteRuntimeExeption: failed to decode NATS message: {}",
63+
"RemoteRuntimeException: failed to decode NATS message: {}",
6464
err
6565
);
6666
return Err(RuntimeError::new(
6767
"T-PROV-000002",
68-
"RemoteRuntimeExeption",
68+
"RemoteRuntimeException",
6969
"Failed to read Remote Response",
7070
));
7171
}

crates/taurus/src/app/worker.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ pub fn spawn_worker(
3737
};
3838

3939
let mut test_execution_subscription = match client
40-
.queue_subscribe(String::from("test_executions.*"), "taurus".into())
40+
.queue_subscribe(String::from("test_execution.*"), "taurus".into())
4141
.await
4242
{
4343
Ok(subscription) => {
44-
log::info!("Subscribed to 'test_executions.*'");
44+
log::info!("Subscribed to 'test_execution.*'");
4545
subscription
4646
}
4747
Err(err) => {
48-
log::error!("Failed to subscribe to 'test_executions.*': {:?}", err);
48+
log::error!("Failed to subscribe to 'test_execution.*': {:?}", err);
4949
return;
5050
}
5151
};
@@ -85,7 +85,7 @@ pub fn spawn_worker(
8585
}
8686
None => {
8787
test_execution_closed = true;
88-
log::warn!("Subscription 'test_executions.*' ended");
88+
log::warn!("Subscription 'test_execution.*' ended");
8989
}
9090
}
9191
}
@@ -159,7 +159,7 @@ async fn process_test_execution_message(
159159
runtime_usage_service: Option<&TaurusRuntimeUsageService>,
160160
) {
161161
let requested_execution_id =
162-
match parse_execution_id_from_subject(&message.subject, "test_executions") {
162+
match parse_execution_id_from_subject(&message.subject, "test_execution") {
163163
Some(res) => res,
164164
None => {
165165
log::error!("Failed to extract execution uuid from {}", &message.subject);
@@ -480,7 +480,7 @@ mod tests {
480480
execution_id: ExecutionId,
481481
payload: Vec<u8>,
482482
) -> Result<ExecutionResult, String> {
483-
let subject = format!("test_executions.{execution_id}");
483+
let subject = format!("test_execution.{execution_id}");
484484

485485
for attempt in 1..=10 {
486486
match tokio::time::timeout(

docs/errors.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This document is the canonical catalog for runtime error codes emitted by Taurus
1010

1111
- `T-STD-XXXXX`: Errors originating inside standard function implementations under `runtime/functions/*`.
1212
- `T-CORE-XXXXXX`: Errors originating from core runtime infrastructure.
13+
- `T-TAURUS-XXXXXX`: Errors originating from the Taurus runtime app layer.
1314
- `T-PROV-XXXXXX`: Errors originating from provider integrations (transport adapters, remote runtime connectors).
1415

1516
## Code Table
@@ -23,10 +24,13 @@ This document is the canonical catalog for runtime error codes emitted by Taurus
2324
| `T-CORE-000003` | Engine | Flow requires remote execution but no remote runtime adapter was configured. | Node execution target is remote while `RemoteRuntime` is `None`. | `runtime/engine/executor.rs` |
2425
| `T-CORE-000004` | Engine | Reference lookup failed in the execution value store. | Missing prior node result, missing flow input path, or unresolved input reference. | `runtime/engine/executor.rs` |
2526
| `T-CORE-000005` | Engine | Remote request cannot be assembled because parameter metadata and resolved values diverge. | Parameter count mismatch during remote request materialization. | `runtime/engine/executor.rs` |
27+
| `T-CORE-000006` | Engine | Remote node execution returned a node result without a success/error outcome. | Provider returned a `NodeExecutionResult` with no `result` field. | `runtime/engine/executor.rs` |
2628
| `T-CORE-000101` | Compiler | Flow compilation failed because a node id appears more than once. | Duplicate `database_id` in input nodes. | `runtime/engine/compiler.rs` |
2729
| `T-CORE-000102` | Compiler | Flow compilation failed because the declared start node is absent. | `start_node_id` not found in node list. | `runtime/engine/compiler.rs` |
2830
| `T-CORE-000103` | Compiler | Flow compilation failed because a `next` edge points to a missing node. | `next_node_id` references unknown node id. | `runtime/engine/compiler.rs` |
2931
| `T-CORE-000104` | Compiler | Flow compilation failed because a parameter is structurally incomplete. | Parameter has no value payload in IR. | `runtime/engine/compiler.rs` |
32+
| `T-CORE-000105` | Compiler | Flow compilation failed because a sub-flow parameter is missing its execution reference. | `sub_flow.execution_reference` is absent. | `runtime/engine/compiler.rs` |
33+
| `T-CORE-000106` | Compiler | Flow compilation failed because a sub-flow parameter uses an unsupported execution reference. | `sub_flow.execution_reference` is not a starting node id. | `runtime/engine/compiler.rs` |
3034
| `T-CORE-000201` | Handler | Handler argument arity contract was violated before function execution began. | `args!`/`no_args!` macro expected different argument count. | `handler/macros.rs` |
3135
| `T-CORE-000202` | Handler | Handler argument type conversion failed during typed extraction. | `TryFromArgument` expected type does not match provided argument. | `handler/argument.rs` |
3236
| `T-CORE-000301` | App Error Mapping | Application configuration failure mapped into runtime error format. | Invalid/missing runtime config surfaced as `Error::Configuration`. | `types/errors/error.rs` |
@@ -35,6 +39,7 @@ This document is the canonical catalog for runtime error codes emitted by Taurus
3539
| `T-CORE-000304` | App Error Mapping | Serialization/deserialization failure mapped into runtime error format. | Encoding/decoding/parsing failure surfaced as `Error::Serialization`. | `types/errors/error.rs` |
3640
| `T-CORE-000399` | App Error Mapping | Internal application failure mapped into runtime error format. | Catch-all non-domain internal failure surfaced as `Error::Internal`. | `types/errors/error.rs` |
3741
| `T-CORE-999999` | Runtime Error Fallback | Default fallback runtime error code when no explicit mapping is provided. | `RuntimeError::default()` used as defensive fallback. | `types/errors/runtime_error.rs` |
42+
| `T-TAURUS-000001` | Taurus App | Test execution request payload could not be decoded as an execution flow. | Malformed or schema-incompatible payload published to the test execution NATS subject. | `taurus/src/app/worker.rs` |
3843
| `T-PROV-000001` | Provider Remote Runtime | Remote request to NATS did not yield a valid response message. | NATS request failed or timed out while waiting for remote runtime answer. | `taurus-provider/providers/remote/nats_remote_runtime.rs` |
3944
| `T-PROV-000002` | Provider Remote Runtime | Remote runtime response could not be decoded into expected protobuf structure. | Received payload is malformed, truncated, or schema-incompatible for `ExecutionResult`. | `taurus-provider/providers/remote/nats_remote_runtime.rs` |
4045
| `T-PROV-000003` | Provider Remote Runtime | Remote runtime response decoded, but contained no concrete result field. | `ExecutionResult` exists but `result` is `None` (protocol contract violation). | `taurus-provider/providers/remote/nats_remote_runtime.rs` |

0 commit comments

Comments
 (0)