Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 37 additions & 13 deletions crates/folderbase-cli/tests/transform_fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ fn rollback_is_idempotent_after_restart() {
assert!(root.path().join("README.md").exists());
}

const LIVE_OKADA_PATH: &str = "/Users/jerel/Work/Chalk/Okada";
const GOLDEN_BOUNDARIES: &[&str] = &[
"ChalkAgents-Prosperna-Client-Engagement",
"Client-Shared",
Expand Down Expand Up @@ -593,14 +592,14 @@ fn committed_golden_expectations() -> serde_json::Value {
}

fn guarded_fixture_source(source: &Path) -> Result<PathBuf, String> {
let live = Path::new(LIVE_OKADA_PATH);
if source == live || source.starts_with(live) {
return Err("live Okada path is forbidden in the golden test harness".to_owned());
let allowed = committed_golden_fixture();
if source != allowed {
return Err("golden tests accept only the committed synthetic fixture".to_owned());
}
let canonical = source
.canonicalize()
.map_err(|error| format!("fixture source is unavailable: {error}"))?;
if canonical != committed_golden_fixture() {
if canonical != allowed {
return Err(format!(
"golden tests accept only the committed synthetic fixture: {}",
canonical.display()
Expand Down Expand Up @@ -636,7 +635,7 @@ fn copy_tree(source: &Path, destination: &Path) {
fn golden_fixture() -> GoldenFixture {
let source = guarded_fixture_source(&committed_golden_fixture()).unwrap();
let temp = tempfile::tempdir().expect("temporary golden fixture");
let root = temp.path().join("Okada-Account");
let root = temp.path().join("Project-2-Account");
copy_tree(&source, &root);
for (source, boundary) in [
(
Expand Down Expand Up @@ -788,7 +787,7 @@ fn source_snapshot(root: &Path) -> Vec<(PathBuf, Vec<u8>)> {
}

#[test]
fn okada_shaped_fixture_produces_expected_questions_without_writes() {
fn project_2_fixture_produces_expected_questions_without_writes() {
let fixture = golden_fixture();
let before = source_snapshot(&fixture.root);
let analysis = analyze(&fixture.root);
Expand Down Expand Up @@ -823,7 +822,29 @@ fn okada_shaped_fixture_produces_expected_questions_without_writes() {
}

#[test]
fn okada_shaped_fixture_groups_every_assignment_into_twenty_bounded_questions() {
fn project_2_expectations_preserve_account_topology_and_provenance() {
let expected = committed_golden_expectations();

assert_eq!(
expected["provenance_labels"],
serde_json::json!(["ChalkAgents", "Prosperna", "Project 2"])
);
assert_eq!(
expected["expected_topology"]["workspace"],
"Project 2 Account Workspace"
);
assert_eq!(
expected["expected_topology"]["folderbases"][0],
"Project 2 Account Folderbase"
);
assert_eq!(
expected["expected_topology"]["permission_inheritance"],
false
);
}

#[test]
fn project_2_fixture_groups_every_assignment_into_twenty_bounded_questions() {
let fixture = golden_fixture();
let analysis = analyze(&fixture.root);
let questions = analysis["questions"].as_array().unwrap();
Expand Down Expand Up @@ -1282,14 +1303,17 @@ fn full_rollback_restores_original_fixture_tree() {
}

#[test]
fn test_harness_rejects_live_okada_path() {
let live = Path::new(LIVE_OKADA_PATH);
let error = guarded_fixture_source(live).unwrap_err();
assert!(error.contains("live Okada path is forbidden"));
fn test_harness_rejects_every_external_path_before_canonicalizing_it() {
let external = Path::new("/private/external/project-2-account");
let error = guarded_fixture_source(external).unwrap_err();
assert_eq!(
error,
"golden tests accept only the committed synthetic fixture"
);
}

#[test]
fn okada_shaped_folder_to_folderbase_journey_preserves_restart_and_agent_entry_contract() {
fn project_2_folder_to_folderbase_journey_preserves_restart_and_agent_entry_contract() {
let fixture = golden_fixture();
let source_before = source_snapshot(&fixture.root);
let started = Instant::now();
Expand Down
2 changes: 1 addition & 1 deletion crates/folderbase-core/tests/root_attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ fn exact_maximum_manifest_is_accepted_and_hashed_as_raw_bytes() {
#[test]
fn nested_roots_attest_independently_and_never_fall_back_to_an_ancestor() {
let parent = root_with_manifest(MANIFEST);
let valid_child = parent.path().join("Clients/Prosperna/Okada");
let valid_child = parent.path().join("Clients/Prosperna/Project 2");
write_root(&valid_child, MANIFEST);

let parent_receipt = attest_folderbase_root(parent.path()).expect("valid parent");
Expand Down
6 changes: 3 additions & 3 deletions crates/folderbase-core/tests/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ fn each_kind_renders_distinct_useful_folderbase_entry() {
"0.2.0",
"customer",
[
("folderbase_name", "Okada Customer Context"),
("purpose", "Understand and serve the Okada account."),
("folderbase_name", "Project 2 Customer Context"),
("purpose", "Understand and serve the Project 2 account."),
("current_state", "Several projects share account context."),
("next_action", "Consolidate the approved account record."),
],
["# Okada Customer Context", "Account/", "customer"],
["# Project 2 Customer Context", "Account/", "customer"],
),
(
"folderbase.temporary",
Expand Down
9 changes: 9 additions & 0 deletions docs/verification/v0.5.0-rc.1-core-release-candidate.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ exactly 152 files, and the exact manifest SHA-256 matched its external sidecar:
09460bfa0732bc471b3fedef173c78a8ecb6f4182b22f762fe8c9b8c2a260278
```

After the release-candidate run, the privacy-safe Project 2 fixture amendment
closed an inventory gap by sealing the golden fixture tree and its expectation
artifact alongside the transform test that consumes them. The current
candidate closure is 197 files and its exact manifest SHA-256 is:

```text
7cb7bf7bca59876037bdd4d38fd8e82c086c865abefc3c37d55d9bad7ce5adad
```

The package verifier built the extracted 65-file Core package and 10-file CLI
package, rejected a deliberately mutated extracted input, ran their tests, and
installed the optimized CLI outside the repository. The installed binary
Expand Down
6 changes: 3 additions & 3 deletions fixtures/client-company-2-shaped-unmanaged.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"provenance_labels": [
"ChalkAgents",
"Prosperna",
"Okada"
"Project 2"
],
"expected_topology": {
"workspace": "Okada Account Workspace",
"workspace": "Project 2 Account Workspace",
"folderbases": [
"Okada Account Folderbase",
"Project 2 Account Folderbase",
"ChalkAgents-Prosperna Engagement Folderbase",
"Security Remediation Project Folderbase",
"Loyalty Revamp Project Folderbase",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Synthetic Okada account context
# Synthetic Project 2 account context

This invented account summary says the work is active and spans security,
loyalty, support, commercial, and client-facing delivery concerns.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Synthetic ChalkAgents–Prosperna engagement provenance

This invented record explains that ChalkAgents performs the represented work
through a Prosperna engagement for the Okada account.
through a Prosperna engagement for the Project 2 account.

It intentionally contains no contract terms, contacts, credentials, invoices,
or customer data. The relationship must never be interpreted as inherited
Expand All @@ -21,7 +21,7 @@ human or agent access.
"folderbases": {
"chalkagents": "folderbase_019f9c00-0000-7000-8000-000000000001",
"prosperna": "folderbase_019f9c00-0000-7000-8000-000000000002",
"okada": "folderbase_019f9c00-0000-7000-8000-000000000003"
"project_2": "folderbase_019f9c00-0000-7000-8000-000000000003"
},
"workspace_id": "workspace_019f9c00-0000-7000-8000-000000000004",
"shared_object_id": "obj_019f9c00-0000-7000-8000-000000000005",
Expand Down Expand Up @@ -68,7 +68,7 @@ human or agent access.
"relationship": "filesystem_parent",
"object": {
"type": "folder",
"id": "Prosperna/Okada"
"id": "Prosperna/Project 2"
}
},
{
Expand Down
16 changes: 8 additions & 8 deletions fixtures/client-company-2-shaped-unmanaged/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Safe Okada-shaped unmanaged fixture
# Safe Project 2 unmanaged fixture

This is a deliberately small, invented folder tree for deterministic
`folderbase inspect`, transform-planning, and migration tests. It approximates
the approved ChalkAgents → Prosperna engagement → Okada account shape without
including any live Okada, Prosperna, ChalkAgents, or personal data.
the approved ChalkAgents → Prosperna engagement → Project 2 account shape without
including any live Project 2, Prosperna, ChalkAgents, or personal data.

Every payload is invented. Files with document, database, archive, image, or
video extensions are tiny labeled placeholders rather than real customer
Expand All @@ -21,8 +21,8 @@ shareable folderbase.
The fixture should eventually produce a reviewable proposal shaped like:

```text
Okada Account Workspace
├── Okada Account Folderbase
Project 2 Account Workspace
├── Project 2 Account Folderbase
├── ChalkAgents–Prosperna Engagement Folderbase
├── Security Remediation Project Folderbase
├── Loyalty Revamp Project Folderbase
Expand Down Expand Up @@ -79,7 +79,7 @@ expectation artifact is not itself part of the inspected source tree.
## Golden-journey normalization

The CLI golden test accepts only this exact committed fixture. It copies the
tree to an isolated temporary `Okada-Account` folder, then gives three existing
tree to an isolated temporary `Project-2-Account` folder, then gives three existing
semantic scopes analyzer-visible boundary names:

- `Engagement-Provenance` becomes
Expand All @@ -91,5 +91,5 @@ semantic scopes analyzer-visible boundary names:
This normalization changes no source bytes and does not touch this committed
fixture. It makes the intended account, engagement, project, commercial,
security, and client-shared decisions explicit through the current public CLI
heuristic. The test harness rejects the live Okada path before any filesystem
operation.
heuristic. The test harness lexically rejects every external fixture path before
canonicalizing or reading it.
Loading