Skip to content

feat: validate optional organs before connecting a Scientist #71

Closed

Description

@Jammy2211

Overview

Add a safe repeatable connection step for an independently named Scientist adopting an already prepared optional organ. Broca is the first fixture; provisioning and full activation remain later phases.

Plan

  • Resolve explicit organ and repository identities using existing profile/body-map contracts.
  • Preview a candidate connection and validate its supplied HTTPS state endpoint.
  • Apply only after validation, preserving records and refusing changed inputs/conflicting existing connections.
  • Test failed setup, retries, independent naming and unavailable evidence after connection; document AI-led resumption.

Tier: judge — merge mode: human /prm.

Detailed implementation plan

Primary: PyAutoScientist, workspace/organ classification. Current branch main, clean; no active claim. Existing unrelated pyautodna-stack-management worktree remains untouched. Branch feature/scientist-organ-connection under .worktrees/scientist-organ-connection.

Add scripts/connect_organ.py with explicit --instance, --repos, --organ, --repo and --pages-url, dry run by default and --apply. Reuse instance_profile, project_resources and Brain _state validator. Verify feed identity and canonical board URL, report status/time without health acceptance. Ensure the candidate matches the existing renderer contract before mutation. Preserve unrelated configuration and reject a different existing connection; identical repeat is a no-op. Recheck input bytes before atomic replacement and retain permissions; cleanup disposable temporary files on failure. No new setup-state ledger or remote write.

Add tests/test_connect_organ.py: missing/invalid/wrong-identity feeds, arbitrary names, dry-run preservation, retry after failed validation, no-op repeat, conflicting existing connection, stale input rejection and atomic failure preservation. Render the successfully connected Broca fixture through Scientist, then make its feed unavailable and prove it remains connected. Run existing Python and JS suites. STARTER.md explains prerequisites and resume prompt, connection versus health/installation, and remaining provisioning/activation milestones.

Original prompt

Validated, repeatable optional-organ connection

Type: feature
Target: PyAutoScientist
Epic: scientist-adoption-pilot
Difficulty: medium
Consequence: judge

Original request

ok great, conitnue work

The human authorized continued optional-organ setup after merging Brain#519, Scientist#70 and Mind#503.

Bounded phase

@PyAutoScientist: add an AI-friendly CLI to preview and apply one explicit connection to an already prepared organ. Broca is the first exercised fixture. Reuse canonical identities, instance/profile/project validation and Brain's state contract. Fetch only the supplied HTTPS state endpoint, validate the feed and exact organ/repo/location before connecting. Do not infer access or naming. No creation/deployment of organs, project source copying, remote writes or assistants required.

Validate before any profile write; errors leave original records intact. Repeating an identical connection is a no-op; different existing connections require explicit manual review. Guard against stale plan overwrite, preserve file mode and other config/projects/records, and replace atomically. Candidate choices and incomplete work stay in the existing Mind task; no new lifecycle ledger. A valid feed can be red or old: connecting is not a health verdict. Subsequent missing/stale evidence stays a connected organ, never an uninstalled capability.

Add scripts/connect_organ.py, focused failure/retry/preservation tests and concise STARTER.md setup/resume instructions. Validate full Scientist Python + JS suites and a Broca feed fixture rendered through the existing dashboard. Follow-up phases remain organ provisioning, setup/paused lifecycle presentation, owner-specific capability validation, upgrades and real collaborator validation. This first phase proves the connection boundary only, not complete organ activation.

Tier: judge — merge mode: human /prm.

Activity

  1. Jammy2211 commented on Oct 11, 2026

    @Jammy2211
    ContributorAuthor

    Implementation ready in #72 at 13ced9e. Preview/validate/apply for existing optional organ feeds; failure-preserving retry/no-op, canonical identities, atomic profile update, record and permission preservation. 113 Python and 7 JS tests pass; final focused 22 tests pass. Independent review CLEAN with extra renamed-repo, old-red-feed and symlink checks.

    Live Broca dashboard HTTP 200, state.json HTTP 404. The CLI rejected this prerequisite gap without changing the synthetic profile. No live activation claim. The next bounded owner-feed task is recorded in draft/feature/pyautobroca/broca_published_state_feed.md, part of scientist-adoption-pilot. Provisioning/owner-specific activation and upgrades remain later phases.

    Heart STALE only (release validation incomplete: no rehearsal for current source), no RED/YELLOW. No release or publication. Awaiting human /prm.

  2. Jammy2211 commented on Oct 11, 2026

    @Jammy2211
    ContributorAuthor

    Validated optional-organ connections

    Merged after explicit human /prm. Exact head 13ced9e is an ancestor of origin/main. CI run 38171330434: tests passed, no other exact-head runs or skipped legs. Local 113 Python and 7 JS tests; final focused 22 connection tests passed. Independent review CLEAN.

    Adds scripts/connect_organ.py and STARTER guidance: preview then validate/apply an explicit connection to an already prepared organ; canonical identities and shared state contract; failed validation preserves records; repeated identical connections are no-ops; atomic profile replacement preserves permissions and refuses detected input changes. Valid red/old evidence is not confused with unconfigured capability. No provisioning, publication, owner-quality validation or release is claimed.

    Live Broca dashboard was HTTP 200 but state.json HTTP 404; the helper correctly refused connection without modifying the synthetic profile. Next prerequisite: draft/feature/pyautobroca/broca_published_state_feed.md, then real feed connection acceptance and owner-specific resumable setup. Record-preserving upgrades and actual collaborator validation remain separate epic phases.

    Heart at ship: STALE only — release validation incomplete: no rehearsal for current source; no RED/YELLOW. Evidence archived under tmp/scientist-organ-connection/. Task claim and worktree released during close-out.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions