Skip to content

s390x (IBM Z) deployment: update to Nous v2 CLI, campaign.yaml and artifact layout #331

Open

Description

@mtoslalibu

Summary

The IBM Z (s390x) container deployment under s390x/ still targets Nous v1. Nous v2 (#330, branch nous-v2) removed the v1 CLI flags and v1 campaign keys. So on v2, s390x/run_campaign.sh deploy fails at once: nous run rejects the v1 flags with an argparse error, exit 2. The example campaign also carries keys that v2 ignores. People use the IBM Z path, so it needs a focused fix before nous-v2 merges into main.

What breaks (with proof, on nous-v2-wip at 302340d)

  1. run_campaign.sh passes removed flags. Lines 307-312:

    nous run ${CAMPAIGN_YAML} --agent sdk --max-iterations ${NOUS_MAX_ITERATIONS} \
        --timeout ${NOUS_TIMEOUT} --max-cli-retries ${NOUS_MAX_CLI_RETRIES} ${auto_approve_flag}
    
    • --agent, --timeout, --max-cli-retries and --auto-approve were removed in 302340d.
    • nous run x.yaml --agent sdk now prints nous: error: unrecognized arguments: --agent sdk and exits 2.
    • --max-iterations is still valid.
    • Lines 66-69 and 282 build these flags from NOUS_TIMEOUT, NOUS_MAX_CLI_RETRIES and NOUS_ALLOW_AUTO_APPROVE. Lines 300-302 pass NOUS_ALLOW_AUTO_APPROVE and ROUTINES_API_BASE into the container; nothing in v2 reads either.
  2. s390x/campaign.yaml uses v1 keys. parse_campaign_config warns about and ignores:

    • prompts: (line 65, methodology_layer: prompts/methodology; that directory no longer exists);
    • max_turns: (lines 77-79, design/execute_analyze; v2 has no turn caps);
    • theory_references: (line 83).

    It sets no task_type, locked_parameters, objective or experiment_commands.

  3. s390x/README.md documents v1:

    • lines 122-125: the max_turns design/execute budgets;
    • line 142: NOUS_ALLOW_AUTO_APPROVE;
    • line 144: NOUS_TIMEOUT and NOUS_MAX_CLI_RETRIES;
    • lines 188-196: the old output layout (findings.json and principles.json at the top level, ledger "per phase", no runs/iter-N/, runs.jsonl, baseline.json, answer.json, nous_evidence/).
  4. s390x/check_claude_agent.py:46 defaults to the image nous:0.4.0.

  5. s390x/Dockerfile:

    • check it installs v2 cleanly. It copies orchestrator/ and prompts/, and installs with --no-deps, so the pinned claude-agent-sdk==0.2.172 from pyproject.toml must come from environment.yml;
    • check the package data (orchestrator/v2/schemas/*.json, prompts/v2/**/*.md, orchestrator/defaults.yaml) is present in the image.

Fix (focused PR into nous-v2)

  • run_campaign.sh:
    • call nous run ${CAMPAIGN_YAML} --max-iterations ${NOUS_MAX_ITERATIONS} only;
    • remove NOUS_TIMEOUT, NOUS_MAX_CLI_RETRIES, NOUS_ALLOW_AUTO_APPROVE and ROUTINES_API_BASE handling;
    • keep NOUS_CAMPAIGN_PARENT and the mounts.
  • campaign.yaml:
    • rewrite in v2 form: research_question, target_system.repo_path, max_iterations, task_type, experiment_commands, optional locked_parameters and objective;
    • move the theory notes into the research_question or the target_system.description;
    • it must parse with no warnings.
  • README.md:
    • v2 env vars and run parameters;
    • the v2 artifact layout, linking to docs/data-model.md and docs/example-campaign/;
    • how to resume (nous resume <work_dir>).
  • environment.yml / Dockerfile:
    • pin claude-agent-sdk==0.2.172, the same version as pyproject.toml;
    • confirm the package data is installed;
    • update check_claude_agent.py's default image tag.

Acceptance

  • bash -n s390x/run_campaign.sh passes, and grep finds no removed flag or removed env var in s390x/.
  • A test or script check: s390x/campaign.yaml parses with orchestrator.v2.config.parse_campaign_config and logs no warnings. This can be a pytest in tests/ that only parses the file, with no live calls.
  • On an IBM Z host: ./s390x/run_campaign.sh verify passes, then one deploy campaign reaches REPORT, with runs.jsonl rows and answer.json present. This is a manual operator check, recorded in the PR.
  • Nothing outside s390x/ changes, except the optional parse test.

Context

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