mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-08 22:21:45 +00:00
parent
273e6751ed
commit
5ee829a05c
4 changed files with 421 additions and 91 deletions
435
run.json
435
run.json
File diff suppressed because one or more lines are too long
66
stages/007-simplify_gpt@1/diff.patch
Normal file
66
stages/007-simplify_gpt@1/diff.patch
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
diff --git a/lib/crates/fabro-agent/src/question_tools.rs b/lib/crates/fabro-agent/src/question_tools.rs
|
||||
index 290b2aa90..d8351d67d 100644
|
||||
--- a/lib/crates/fabro-agent/src/question_tools.rs
|
||||
+++ b/lib/crates/fabro-agent/src/question_tools.rs
|
||||
@@ -397,8 +397,7 @@ fn display_text(header: Option<&str>, question: &str) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
-#[must_use]
|
||||
-pub fn bounded_display_field(value: &str, max_chars: usize) -> String {
|
||||
+fn bounded_display_field(value: &str, max_chars: usize) -> String {
|
||||
match value.char_indices().nth(max_chars) {
|
||||
Some((byte_idx, _)) => value[..byte_idx].to_string(),
|
||||
None => value.to_string(),
|
||||
diff --git a/lib/crates/fabro-workflow/src/interview_runtime.rs b/lib/crates/fabro-workflow/src/interview_runtime.rs
|
||||
index f0898a55c..f0370ae0e 100644
|
||||
--- a/lib/crates/fabro-workflow/src/interview_runtime.rs
|
||||
+++ b/lib/crates/fabro-workflow/src/interview_runtime.rs
|
||||
@@ -10,6 +10,7 @@ use fabro_interview::{Answer, AnswerSubmission, AnswerValue, Interviewer, Questi
|
||||
use fabro_types::{BlockedReason, InterviewOption, Principal, SystemActorKind};
|
||||
use futures::future;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
+use ulid::Ulid;
|
||||
|
||||
use crate::event::{Emitter, Event, StageScope};
|
||||
use crate::millis_u64;
|
||||
@@ -420,10 +421,7 @@ fn answer_from_submission(
|
||||
|
||||
fn answer_labels(options: &[InterviewOption], answer: &Answer) -> Vec<String> {
|
||||
match &answer.value {
|
||||
- AnswerValue::Selected(key) => vec![answer.selected_option.as_ref().map_or_else(
|
||||
- || label_for_key(options, key),
|
||||
- |option| option.label.clone(),
|
||||
- )],
|
||||
+ AnswerValue::Selected(key) => vec![label_for_key(options, key)],
|
||||
AnswerValue::MultiSelected(keys) => {
|
||||
keys.iter().map(|key| label_for_key(options, key)).collect()
|
||||
}
|
||||
@@ -446,11 +444,12 @@ fn label_for_key(options: &[InterviewOption], key: &str) -> String {
|
||||
|
||||
fn internal_question_id(scope: &StageScope, tool_call_id: &str, index: usize) -> String {
|
||||
format!(
|
||||
- "agentq-{}-v{}-{}-{}",
|
||||
+ "agentq-{}-v{}-{}-{}-{}",
|
||||
slug(&scope.node_id),
|
||||
scope.visit,
|
||||
slug(tool_call_id),
|
||||
index + 1,
|
||||
+ Ulid::new(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -511,7 +510,12 @@ mod tests {
|
||||
|
||||
let id = internal_question_id(&scope, "call_123", 1);
|
||||
|
||||
- assert_eq!(id, "agentq-reviewchanges-v3-call_123-2");
|
||||
+ assert!(id.starts_with("agentq-reviewchanges-v3-call_123-2-"));
|
||||
+ let ulid = id
|
||||
+ .rsplit('-')
|
||||
+ .next()
|
||||
+ .expect("question id should include a ULID suffix");
|
||||
+ assert_eq!(ulid.len(), 26);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
6
stages/007-simplify_gpt@1/status.json
Normal file
6
stages/007-simplify_gpt@1/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"outcome": "succeeded",
|
||||
"notes": "Stage completed: simplify_gpt",
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-05-23T17:43:36.864818Z"
|
||||
}
|
||||
5
stages/008-verify@1/script_invocation.json
Normal file
5
stages/008-verify@1/script_invocation.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"script": "git fetch origin main 2>&1 && git merge --no-edit --no-stat origin/main 2>&1 && cargo +nightly-2026-04-14 fmt --all 2>&1 && cargo dev docs refresh 2>&1 && cargo +nightly-2026-04-14 fmt --check --all 2>&1 && ! rg -n 'AuthMode::Disabled|RunAuthMethod|RunSubjectProvenance|\\bActorRef\\b|\\bActorKind\\b|AuthenticatedSubject|AuthenticatedService|AuthorizeRunScoped|AuthorizeRunBlob|AuthorizeStageArtifact|AuthorizeCommandLog|auth_method\\s*==\\s*\"disabled\"' lib/crates apps lib/packages docs/public/api-reference/fabro-api.yaml 2>&1 && cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --workspace --status-level slow --profile ci 2>&1 && cargo dev docs check 2>&1 && bun install --frozen-lockfile 2>&1 && (cd apps/fabro-web && bun run typecheck) 2>&1 && (cd apps/fabro-web && bun run test) 2>&1 && (cd lib/packages/fabro-api-client && bun run typecheck) 2>&1 && cargo dev build -- -p fabro-cli --release 2>&1",
|
||||
"command": "exec 2>&1\ngit fetch origin main 2>&1 && git merge --no-edit --no-stat origin/main 2>&1 && cargo +nightly-2026-04-14 fmt --all 2>&1 && cargo dev docs refresh 2>&1 && cargo +nightly-2026-04-14 fmt --check --all 2>&1 && ! rg -n 'AuthMode::Disabled|RunAuthMethod|RunSubjectProvenance|\\bActorRef\\b|\\bActorKind\\b|AuthenticatedSubject|AuthenticatedService|AuthorizeRunScoped|AuthorizeRunBlob|AuthorizeStageArtifact|AuthorizeCommandLog|auth_method\\s*==\\s*\"disabled\"' lib/crates apps lib/packages docs/public/api-reference/fabro-api.yaml 2>&1 && cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --workspace --status-level slow --profile ci 2>&1 && cargo dev docs check 2>&1 && bun install --frozen-lockfile 2>&1 && (cd apps/fabro-web && bun run typecheck) 2>&1 && (cd apps/fabro-web && bun run test) 2>&1 && (cd lib/packages/fabro-api-client && bun run typecheck) 2>&1 && cargo dev build -- -p fabro-cli --release 2>&1",
|
||||
"language": "shell"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue