Skip to content

Imports: two sources with one base name share one output job folder, prune each other's trials and share an identity #400

Description

@harenome

Priority

high by depth: the importers (app/nullius/importers/atif.py, otel.py) and the job identity the reader gives an import. P2 is set: renaming a source folder, or --job-name on the command line, works around it.

Components

  • app/nullius (backend)
  • app/web (routes)
  • templates and static files
  • docs and the site
  • catalogue (benchmarks, agents, capabilities)
  • the standard (ports, kits, relay, runs)
  • CI, workflows and skills

Today

On main 35686e0, an import's output folder is named after its source's base name only:

  • ATIF: job_name = f"{NAME}__{base}", base = os.path.basename(os.path.normpath(root)) (app/nullius/importers/atif.py, lines 373-376).
  • OpenTelemetry: name = job_name or f"{NAME}__{os.path.basename(os.path.abspath(root)) or 'export'}" (app/nullius/importers/otel.py, line 266).
  • A workspace converts every root into its imported/ folder (app/nullius/workspace.py, line 102; app/web/shared.py, line 290), so /x/logs and /y/logs both write imported/atif__logs.
  • Each conversion removes every trial folder of that job it did not produce itself (atif.py, lines 332-335; otel.py, lines 216-219): converting one source prunes the other's trials, and the folder holds whichever ran last.
  • With job identity (Give every job an identity that survives a copy or a move, apart from its folder name #399), app/nullius/runs/uid.py derives an import's uid from its format and folder name only, so the two share one identity; a shortcut: comment there names this.

Wanted

  • Each registered source gets an id of its own when first converted, written into the converted job's config.json (for example nullius.source) and kept on every reconversion.
  • The output folder is allocated per source, not per base name.
  • The job's identity is declared from that id.
  • Old conversions without the id keep being read; nothing rewrites them to gain one.

Acceptance

  • Two sources with one base name get two output folders and two identities (test).
  • Reconverting one source keeps its identity and touches only its own folder (test).
  • An old conversion without the id still reads (test).

Dependencies and related

After #399 (job identity). #362 waits for it: until then the judgements of two such imports would be shared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions