M5c-2 plan: task 01, workspace names up to memoryd's 512
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ fn the_name_and_the_limits() {
|
||||
assert_eq!(ASK_MEMORY, "ask_memory");
|
||||
assert_eq!(MAX_QUESTION, 2_000);
|
||||
assert_eq!(MAX_WORKSPACES, 2);
|
||||
assert_eq!(MAX_WORKSPACE_NAME, 100);
|
||||
assert_eq!(MAX_WORKSPACE_NAME, 512);
|
||||
assert_eq!(OWN_WORKSPACE, "own");
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ fn at_most_two_workspaces_each_named_once() {
|
||||
/// Only the form is checked here; whether a name is one of `[honcho]`'s workspaces is `memoryd`'s
|
||||
/// check.
|
||||
#[test]
|
||||
fn a_workspace_name_has_1_to_100_letters_digits_underscores_or_hyphens() {
|
||||
let form = "a workspace name has 1 to 100 letters, digits, _ or -; use own, untrusted, fleet or \
|
||||
fn a_workspace_name_has_1_to_512_letters_digits_underscores_or_hyphens() {
|
||||
let form = "a workspace name has 1 to 512 letters, digits, _ or -; use own, untrusted, fleet or \
|
||||
another agent's name";
|
||||
for good in [
|
||||
"own",
|
||||
@@ -138,7 +138,7 @@ fn a_workspace_name_has_1_to_100_letters_digits_underscores_or_hyphens() {
|
||||
"Boxmaker_1-trusted",
|
||||
"x",
|
||||
"-_-",
|
||||
&"a".repeat(100),
|
||||
&"a".repeat(512),
|
||||
] {
|
||||
assert_eq!(ask("q", &[good]).check(), Ok(()), "{good}");
|
||||
}
|
||||
@@ -152,7 +152,7 @@ fn a_workspace_name_has_1_to_100_letters_digits_underscores_or_hyphens() {
|
||||
"é",
|
||||
"own\n",
|
||||
"a:b",
|
||||
&"a".repeat(101),
|
||||
&"a".repeat(513),
|
||||
] {
|
||||
assert_eq!(refused(&ask("q", &[bad])), form, "{bad:?}");
|
||||
assert_eq!(refused(&ask("q", &["own", bad])), form, "second: {bad:?}");
|
||||
|
||||
Reference in New Issue
Block a user