Skip to content

Deepen the observable Workspace donor study - #16

Merged
jaydumisuni merged 10 commits into
mainfrom
phase0c-workspace-deep-study-v2
Jul 24, 2026
Merged

Deepen the observable Workspace donor study#16
jaydumisuni merged 10 commits into
mainfrom
phase0c-workspace-deep-study-v2

Conversation

@jaydumisuni

@jaydumisuni jaydumisuni commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Purpose

Study the current ChatGPT Workspace more deeply as an observable behavioural donor, using ten primary specialist lanes and ten independent verifier lanes.

This does not use or require OpenAI private source code. It borrows interaction, operation and reliability patterns only.

Improvements retained

  • typed and lazily discoverable Facility operations;
  • operation effect classes;
  • separation between external Provider permissions and confirmation policy;
  • external-reference versus materialized-file truth;
  • progress, partial output and failed-Attempt retention;
  • stable handles for large results;
  • render-independent typed Views;
  • one-off, recurring and condition-triggered schedule modes;
  • exact Revision/head preconditions;
  • observe/draft/simulate/execute/verify lifecycles;
  • distinct success, failure, decline, cancellation, not-run and partial-completion states;
  • connector provenance, visible limits and cross-device continuity.

Fixed Ptah boundary

  • Ptah remains the neutral Workspace and execution substrate.
  • Hunter or another caller owns intelligence, context selection, planning and next-action proposals.
  • Sergeant independently reviews frozen candidates.
  • Humans or calling applications own approval, acceptance, rejection and release.

Exact-head proof

Exact head: bf4ae98b9d492ad688644fd6a330aaf435ac70c1

  • deep-study workflow run: 30087967851;
  • retained artifact: 8594496859;
  • artifact digest: sha256:aea4fde3f600a6e4c3fc2f6ff3614918a5f714c6f8ebbf6ab3fb3cb29ccaf12b;
  • validation SHA-256: 329262e7bb12e0841f1884664e713ab8e55a58e45a2430d4abf77ccdde65ecbe;
  • 26/26 valid and adversarial cases passed;
  • 22 mechanical capabilities;
  • 28 behaviour mappings;
  • 20 fixtures;
  • all eleven repository workflows passed on the exact head.

The backend-signature lane initially retained two upstream HTTP 504 failures for the locked libarchive detached-signature URL. A third independent attempt passed without changing source or weakening proof.

Non-operative boundary

  • 0 new Core entities;
  • no WP01-WP14 contract reopen;
  • no P01 proof claim;
  • no ADR-0033 acceptance;
  • runtime implementation remains unauthorized;
  • nine-file changed boundary only.

Summary by CodeRabbit

  • New Features

    • Added a documented Workspace operations profile covering discovery, permissions, scheduling, results, and materialization behavior.
    • Added 14 positive and negative scenarios describing expected Workspace operation outcomes.
    • Added a gap map clarifying supported capabilities, caller-owned responsibilities, and rejected patterns.
  • Bug Fixes

    • Added automated validation and adversarial regression coverage to detect contract, boundary, and documentation drift.
  • Chores

    • Added automated pull request and manual validation with retained evidence artifacts.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a v2 Workspace operations donor study with candidate artifacts, a strict deterministic validator, adversarial regression tests, and a GitHub Actions workflow that binds validation results to the exact PR head and retained evidence artifacts.

Changes

Workspace operations study

Layer / File(s) Summary
Observable Workspace donor study
design/donors/openai-chatgpt-workspace-deep-study.md, design/donors/openai-chatgpt-projects-work.md
Documents public-source observations, operation and scheduling behaviors, authority boundaries, rejected patterns, and non-operative contract conclusions.
Workspace operations candidate contracts
design/candidates/workspace-operations-profile-v2.json, design/candidates/workspace-operations-gap-map-v2.json, design/candidates/fixtures/*, design/candidates/PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md
Defines the v2 profile, capability classifications, fixture scenarios, operation states, caller-owned responsibilities, and frozen-contract/runtime flags.
Deep-study validator
tools/check_workspace_operations_donor_v2.py
Validates required files, text, JSON identities, enumerations, counts, flags, mappings, fixtures, catalog values, and deterministic file digests.
Validator regression coverage
tools/test_check_workspace_operations_donor_v2.py
Tests a valid candidate and adversarial mutations covering authority, schema, mappings, fixtures, donor text, profile data, and catalog counts.
CI validation and evidence packaging
.github/workflows/phase0c-workspace-deep-study-v2.yml
Runs regression and study validation for exact PR heads or manual dispatches, verifies report metadata, computes a report digest, and uploads retained evidence artifacts.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant Repository
  participant RegressionTests
  participant Validator
  participant EvidenceStep
  participant ArtifactStore
  GitHubActions->>Repository: checkout exact PR head SHA
  GitHubActions->>RegressionTests: run 26 regression cases
  GitHubActions->>Validator: generate validation report
  Validator-->>EvidenceStep: validation JSON
  EvidenceStep->>EvidenceStep: verify status, counts, flags, and digest
  EvidenceStep->>ArtifactStore: upload validation and regression evidence
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: deepening the observable Workspace donor study.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase0c-workspace-deep-study-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Owner Author

Direct review completed on exact head bf4ae98b9d492ad688644fd6a330aaf435ac70c1.

  • changed boundary: exactly nine donor/profile/fixture/validator/workflow files;
  • deep-study proof: 26/26 cases passed;
  • retained exact-head artifact: 8594496859;
  • no private OpenAI source or hidden implementation claim;
  • no new Core entity or WP01-WP14 reopen;
  • Ptah decision/context/review/approval authority all remain false;
  • P01, ADR-0033 and runtime-authorization state unchanged;
  • all eleven repository lanes ultimately passed; two transient libarchive signature HTTP 504 attempts remain retained as negative evidence before the successful retry.

No direct-review blocker found.

@jaydumisuni
jaydumisuni marked this pull request as ready for review July 24, 2026 11:06

@jaydumisuni jaydumisuni left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct review: exact nine-file boundary matches the declared donor/profile/test/workflow scope. All 26 cases and eleven exact-head workflows passed. No contract, runtime, P01 or ADR authority change is present. No blocking finding.

@jaydumisuni
jaydumisuni merged commit 23dc4b1 into main Jul 24, 2026
16 of 19 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (4)
design/donors/openai-chatgpt-workspace-deep-study.md (1)

45-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Record the study’s evidence window.

The supplement says “Official documentation inspected” and studies the “current Workspace,” but does not record an observation or retrieval date. The existing donor has explicit dates, while the referenced official Library and Apps pages are independently updated over time. (help.openai.com) Add an Observed/Sources retrieved date and, ideally, retained snapshots or hashes for the cited pages and direct-observation run.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@design/donors/openai-chatgpt-workspace-deep-study.md` around lines 45 - 60,
Update the “Public and observable sources” section to record the study’s
evidence window with an explicit Observed or Sources retrieved date. Include the
retrieval/observation date for the cited official documentation and
direct-observation run, and add retained snapshots or hashes for those sources
where available.

Source: MCP tools

tools/test_check_workspace_operations_donor_v2.py (2)

14-25: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Full repo copied on every test (26x).

setUp() runs shutil.copytree of the entire repository for each of the 26 tests, including .git and any other unrelated directories. Given the catalog alone reports 346 schemas / 99 state machines, this is meaningful, avoidable I/O overhead in CI.

♻️ Quick win: exclude `.git` from the copy
     def setUp(self) -> None:
         self.tempdir = tempfile.TemporaryDirectory()
         self.root = Path(self.tempdir.name) / "repo"
-        shutil.copytree(self.source_root, self.root)
+        shutil.copytree(
+            self.source_root,
+            self.root,
+            ignore=shutil.ignore_patterns(".git"),
+        )

For a larger win, consider a setUpClass-built shared base copy plus per-test overlay of only the files each test mutates, since validate() only ever reads a fixed, known set of paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/test_check_workspace_operations_donor_v2.py` around lines 14 - 25,
Reduce test setup I/O in WorkspaceOperationsStudyTests by excluding the .git
directory from the shutil.copytree call in setUp. Preserve the existing
temporary repository behavior and cleanup while avoiding unnecessary repository
metadata and unrelated files; a shared base copy and per-test overlays are
optional and not required.

149-176: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

test_16/17/18 don't reach the check they're meant to exercise.

Each of these mutates a single gap mapping's classification and adjusts the summary counts, but the adjusted summary (e.g. covered_by_neutral_substrate: 15 or 17) no longer equals the validator's hardcoded EXPECTED_SUMMARY (16/6/0/6). That trips the generic "gap map summary mismatch" check first, so the tests never actually reach:

  • the dedicated candidate_core_extension count guard (test_16's intent), or
  • the "semantic function is not caller-owned" per-capability guard (test_17/test_18's intent).

assertRaises(StudyError) still passes, but a bug specifically in the per-capability caller-ownership check would go undetected. To exercise the intended branch, compensate with a second mapping swap so the aggregate summary still matches EXPECTED_SUMMARY while the targeted capability's classification is still wrong, e.g.:

def test_17_context_mapping_to_core_fails(self) -> None:
    path = "design/candidates/workspace-operations-gap-map-v2.json"
    data = self.load(path)
    item = next(x for x in data["mappings"] if x["capability"] == "context selection and relevance")
    item["classification"] = "covered_by_neutral_substrate"
    # compensate so aggregate summary still matches EXPECTED_SUMMARY
    other = next(
        x for x in data["mappings"]
        if x["classification"] == "covered_by_neutral_substrate"
        and x["capability"] != "context selection and relevance"
    )
    other["classification"] = "caller_application_composition"
    self.save(path, data)
    self.assert_invalid()

Apply the analogous compensating swap to test_16 and test_18.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/test_check_workspace_operations_donor_v2.py` around lines 149 - 176,
Update test_16_gap_extension_fails, test_17_context_mapping_to_core_fails, and
test_18_approval_mapping_to_core_fails to compensate each targeted
classification mutation with a swap on a different mapping, preserving
EXPECTED_SUMMARY. Keep each target capability’s invalid classification intact so
assert_invalid reaches the intended candidate_core_extension or caller-ownership
validation branch rather than failing on summary mismatch.
tools/check_workspace_operations_donor_v2.py (1)

118-130: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Ambiguous Unicode dash in required literal match.

"no reason to reopen WP01–WP14" uses an EN DASH rather than a hyphen. Since this is matched via exact substring require() against donor prose, a future edit that "normalizes" this character (e.g., an editor auto-correct, or copy/paste from a different source) would silently break the check with a generic "missing required text" error, and the visual similarity makes the root cause hard to spot.

♻️ Optional: make the literal unambiguous or comment it
-        "no reason to reopen WP01–WP14",
+        "no reason to reopen WP01–WP14",  # NOTE: EN DASH (U+2013), intentional to match donor markdown verbatim
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/check_workspace_operations_donor_v2.py` around lines 118 - 130, Update
the required literal in the token list used by the workspace donor check so the
WP01–WP14 range uses an unambiguous, normalization-resistant representation;
preserve the exact intended matching behavior in require() and make the
character choice explicit if the literal must remain unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/phase0c-workspace-deep-study-v2.yml:
- Around line 5-16: Align the workflow path filter with the validator’s actual
inputs: add README.md so README-only changes rerun the check, and either update
the validator to load and hash PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md or remove
that Markdown profile from the workflow’s paths. Keep the workflow and validator
validation scope consistent.
- Around line 43-47: Update the “Run 26 valid and adversarial cases” step and
the evidence-generation step to verify that the executed unittest summary
reports exactly 26 tests with zero skipped cases before recording
regression_case_count: 26. Capture and inspect the test output or emit a
machine-readable count, and fail the workflow when the count or skipped-case
condition does not match.
- Around line 26-30: Update the actions/checkout@v4 configuration in “Check out
exact pull-request head” to set persist-credentials to false, while preserving
the existing ref and fetch-depth settings.

In `@design/donors/openai-chatgpt-workspace-deep-study.md`:
- Around line 161-164: Define an explicit unknown-effect/indeterminate state for
external-side-effect Attempts and update the retry semantics so a missing
completion response cannot blindly create a new Attempt. Require either an
idempotency key/provider deduplication mechanism or verify-before-retry
reconciliation, and update the profile, validator, and retry fixtures to assert
this behavior while preserving failed Attempt and partial Artifact history.

---

Nitpick comments:
In `@design/donors/openai-chatgpt-workspace-deep-study.md`:
- Around line 45-60: Update the “Public and observable sources” section to
record the study’s evidence window with an explicit Observed or Sources
retrieved date. Include the retrieval/observation date for the cited official
documentation and direct-observation run, and add retained snapshots or hashes
for those sources where available.

In `@tools/check_workspace_operations_donor_v2.py`:
- Around line 118-130: Update the required literal in the token list used by the
workspace donor check so the WP01–WP14 range uses an unambiguous,
normalization-resistant representation; preserve the exact intended matching
behavior in require() and make the character choice explicit if the literal must
remain unchanged.

In `@tools/test_check_workspace_operations_donor_v2.py`:
- Around line 14-25: Reduce test setup I/O in WorkspaceOperationsStudyTests by
excluding the .git directory from the shutil.copytree call in setUp. Preserve
the existing temporary repository behavior and cleanup while avoiding
unnecessary repository metadata and unrelated files; a shared base copy and
per-test overlays are optional and not required.
- Around line 149-176: Update test_16_gap_extension_fails,
test_17_context_mapping_to_core_fails, and
test_18_approval_mapping_to_core_fails to compensate each targeted
classification mutation with a swap on a different mapping, preserving
EXPECTED_SUMMARY. Keep each target capability’s invalid classification intact so
assert_invalid reaches the intended candidate_core_extension or caller-ownership
validation branch rather than failing on summary mismatch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc44da6e-68d4-44e0-94ae-29a0dafb6bd3

📥 Commits

Reviewing files that changed from the base of the PR and between 8a8d620 and bf4ae98.

📒 Files selected for processing (9)
  • .github/workflows/phase0c-workspace-deep-study-v2.yml
  • design/candidates/PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md
  • design/candidates/fixtures/workspace-operations-fixtures-v2.json
  • design/candidates/workspace-operations-gap-map-v2.json
  • design/candidates/workspace-operations-profile-v2.json
  • design/donors/openai-chatgpt-projects-work.md
  • design/donors/openai-chatgpt-workspace-deep-study.md
  • tools/check_workspace_operations_donor_v2.py
  • tools/test_check_workspace_operations_donor_v2.py

Comment on lines +5 to +16
paths:
- "design/donors/openai-chatgpt-workspace-deep-study.md"
- "design/candidates/PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md"
- "design/candidates/workspace-operations-profile-v2.json"
- "design/candidates/workspace-operations-gap-map-v2.json"
- "design/candidates/fixtures/workspace-operations-fixtures-v2.json"
- "tools/check_workspace_operations_donor_v2.py"
- "tools/test_check_workspace_operations_donor_v2.py"
- ".github/workflows/phase0c-workspace-deep-study-v2.yml"
- "design/donors/openai-chatgpt-projects-work.md"
- "design/candidates/ai-project-workspace-profile.json"
- "contracts/generated/catalog-index.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Align the trigger paths with the validator’s actual inputs.

The validator reads README.md, but this path filter omits it, so a README-only boundary change can merge without rerunning this check. Conversely, design/candidates/PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md triggers the workflow but is not loaded or hashed by the validator, allowing the human-readable profile to drift from the JSON contract while CI remains green. Add README.md and validate/bind the Markdown profile, or remove the latter from the claimed validation scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/phase0c-workspace-deep-study-v2.yml around lines 5 - 16,
Align the workflow path filter with the validator’s actual inputs: add README.md
so README-only changes rerun the check, and either update the validator to load
and hash PTAH-WORKSPACE-OPERATIONS-PROFILE-V2.md or remove that Markdown profile
from the workflow’s paths. Keep the workflow and validator validation scope
consistent.

Comment on lines +26 to +30
- name: Check out exact pull-request head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file =="
if [ -f .github/workflows/phase0c-workspace-deep-study-v2.yml ]; then
  nl -ba .github/workflows/phase0c-workspace-deep-study-v2.yml | sed -n '1,220p'
else
  echo "workflow not found"
fi

echo "== checkout token references =="
rg -n "github-token|GITHUB_TOKEN|git config|persist-credentials|upload-artifact|artifact|validator-output|github.event.pull_request.head.sha|pull_request|pull_request_target" .github/workflows/phase0c-workspace-deep-study-v2.yml || true

echo "== workflow files mentioning checkout@v4 persist =="
rg -n "actions/checkout@v4|persist-credentials" .github/workflows || true

Repository: jaydumisuni/Ptah-space

Length of output: 220


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file =="
if [ -f .github/workflows/phase0c-workspace-deep-study-v2.yml ]; then
  sed -n '1,220p' .github/workflows/phase0c-workspace-deep-study-v2.yml | awk '{printf "%6d  %s\n", NR, $0}'
else
  echo "workflow not found"
fi

echo "== checkout token references =="
grep -nE "github-token|GITHUB_TOKEN|git config|persist-credentials|upload-artifact|artifact|validator-output|github.event.pull_request.head.sha|pull_request|pull_request_target" .github/workflows/phase0c-workspace-deep-study-v2.yml || true

echo "== workflow files mentioning checkout@v4 persist =="
grep -nE "actions/checkout@v4|persist-credentials" .github/workflows || true

echo "== changed workflow status =="
git diff --stat -- .github/workflows/phase0c-workspace-deep-study-v2.yml || true

Repository: jaydumisuni/Ptah-space

Length of output: 5799


🌐 Web query:

actions/checkout v4 persist-credentials default true GitHub token .git/config

💡 Result:

In actions/checkout v4, the persist-credentials input defaults to true [1][2]. When this setting is enabled, the action configures the Git access token (typically the GITHUB_TOKEN) into the local repository's.git/config file, allowing subsequent steps in your workflow to run authenticated Git commands automatically [3][4][5]. Specifically, in v4, the credential is written directly into the.git/config file as an http.https://github.com/.extraheader value [5]. Because the token is stored within the.git directory, it is included if the workspace (including the.git folder) is uploaded as a build artifact, which creates a potential credential exposure risk [5]. The token is removed by the action during the post-job cleanup phase [3][4]. If your workflow does not require subsequent authenticated Git commands, you can opt out of this behavior by setting persist-credentials to false [3][5]: - uses: actions/checkout@v4 with: persist-credentials: false Setting this to false prevents the credential from being written to the configuration file, thereby reducing the surface area for potential leaks [5].

Citations:


Disable checkout credential persistence before executing PR code.

actions/checkout@v4 persists the workflow token in .git/config by default, and this workflow subsequently runs PR-controlled Python and uploads validator-output.txt, exact-head.txt, exact-head-evidence.json, workspace-deep-study-validation.json, and regressions.txt. A malicious change in the checked-out PR branch can access that token before job cleanup and expose it in logs or artifacts. Set persist-credentials: false; no later authenticated Git operation is needed.

Proposed fix
         with:
           ref: $${{ github.event.pull_request.head.sha || github.sha }}
           fetch-depth: 1
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Check out exact pull-request head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1
- name: Check out exact pull-request head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 26-30: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/phase0c-workspace-deep-study-v2.yml around lines 26 - 30,
Update the actions/checkout@v4 configuration in “Check out exact pull-request
head” to set persist-credentials to false, while preserving the existing ref and
fetch-depth settings.

Source: Linters/SAST tools

Comment on lines +43 to +47
- name: Run 26 valid and adversarial cases
shell: bash
run: |
set -euo pipefail
python3 tools/test_check_workspace_operations_donor_v2.py -v 2>&1 | tee regressions.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Bind the reported regression count to the executed tests.

The evidence hard-codes regression_case_count: 26, but the workflow never verifies that 26 tests actually ran or that none were skipped. A reduced or skipped suite could still exit successfully and produce false 26/26 evidence. Assert the unittest summary and zero skipped cases, or emit and consume a machine-readable count before writing the evidence file.

Proposed minimum check
           python3 tools/test_check_workspace_operations_donor_v2.py -v 2>&1 | tee regressions.txt
+          grep -Eq '^Ran 26 tests in ' regressions.txt
+          ! grep -Eq '^OK \(skipped=' regressions.txt

Also applies to: 87-89

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/phase0c-workspace-deep-study-v2.yml around lines 43 - 47,
Update the “Run 26 valid and adversarial cases” step and the evidence-generation
step to verify that the executed unittest summary reports exactly 26 tests with
zero skipped cases before recording regression_case_count: 26. Capture and
inspect the test output or emit a machine-readable count, and fail the workflow
when the count or skipped-case condition does not match.

Comment on lines +161 to +164
- truthful estimate only when one is available.

Failure after partial production must retain both the failed Attempt and every valid partial Artifact. Retry creates a new Attempt linked to the failed one; it does not erase history.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Define safe retry semantics for unknown external effects.

When an external-side-effect operation receives no completion response, creating a new Attempt can duplicate a non-idempotent write if the first request already committed. The profile has no canonical unknown_effect/indeterminate state, and the retry fixture permits not_run_or_unknown_effect. Require an idempotency key/provider deduplication mechanism or verify-before-retry reconciliation, then make the profile, validator, and fixtures assert that behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@design/donors/openai-chatgpt-workspace-deep-study.md` around lines 161 - 164,
Define an explicit unknown-effect/indeterminate state for external-side-effect
Attempts and update the retry semantics so a missing completion response cannot
blindly create a new Attempt. Require either an idempotency key/provider
deduplication mechanism or verify-before-retry reconciliation, and update the
profile, validator, and retry fixtures to assert this behavior while preserving
failed Attempt and partial Artifact history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant