发布

  • genomic-intelligence: reconcile the skill against the live /v1 contract (1.1) (#228)

    frostbyte_neo 发布于 2026-09-11 17:12:06 +00:00

    • Correct the genomic-intelligence expression contract (tss_index, 9,198-500,000 bp)

    Genomic Intelligence shipped a new expression contract to production on
    2026-08-18 (gpu_service 2026.08.18.1). Expression now has its own
    published OpenAPI operation (POST /v1/tasks/expression/predict, schema
    ExpressionPredictRequest) instead of the generic templated one, so the
    skill's description of it was wrong in four ways:

    • the sequence bound is 9,198-500,000 bp, not "exactly 9,198 bp";
    • a new required field tss_index (0-based, into the whitespace-stripped
      sequence, 4599 <= tss_index <= len-4599) selects the window the server
      slices, and is mandatory unless the sequence is exactly 9,198 bp;
    • options is now a closed object whose only, required, key is
      description;
    • violations are 422 validation_failed, never a padded/truncated 200.

    Also documents the response's new tss_index / scored_window /
    submitted_sequence_length provenance fields, and the gotcha that an
    in-range but wrong tss_index returns a confident 200 for the wrong
    window. The five other tasks and the composite workflow are unchanged.

    Co-Authored-By: Claude Opus 5 noreply@anthropic.com

    • Correct the genomic-intelligence /v1 contract (per-task floors, typed options)

    Correct the skill against the settled /v1 contract (DEV 2026.08.19.4):

    • Replace "all six tasks share one shape / one PredictRequest". Six literal
      predict operations are published, one per task, each with its own request
      schema, minLength and closed options object. The URLs are unchanged.
    • Replace the "1-500,000 bp" length bound with the real per-task floors:
      promoter 300, splice 100, enhancer 50, chromatin 200, annotation 1,000,
      expression 9,198, composite 1,000; 500,000 cap throughout.
    • Add the floor-is-not-regime rule: a request above the floor but below the
      model's bio_spec.context_window_bp is accepted and scored against a padded
      window. Enhancer's 50 bp bound vs its 249 bp context window is the sharp case.
    • Correct "413 sequence too long": over-length is 422 validation_failed. 413
      means the 16 MiB raw-body cap or the composite's sync_too_large.
    • Document typed, closed per-task options (an unknown key is a hard 422
      extra_forbidden), the closed 21-value error code enum, the defensive-details
      rule, the Prefer header on all six operations, and the published composite
      REST workflow.
    • Note that tss_index errors report at loc ["body"], never body.tss_index, so
      clients must match on error.code.
    • Document the new bio_spec fields (request_max_bp, context_window_bp,
      trained_window_bp), that max_seq_length_bp is legacy/ambiguous, that there is
      no strand_sensitive flag, and that GET /v1/tasks/{task}/models returns a flat
      object rather than the {data, meta} envelope.
    • Add an unknown task -> 404 not_found note and a schema-version caveat, since
      production may still serve 2026.08.18.1 until this build is promoted.

    Verified against the live DEV schema (info.version 2026.08.19.4 (a5b1f88),
    11 operations, no PredictRequest component).

    • Name the field the expression window actually comes from

    Expression reports context_window_bp: null; 9,198 bp is
    trained_window_bp. The SKILL.md and references/tasks.md tables listed
    9,198 under a "Model context window" column, conflating the two.

    • docs(genomic-intelligence): mode is a per-request choice, not a task property

    Every predict operation declares the Prefer header and both 200 and 202.
    Verified live against 2026.08.19.4: promoter submitted with
    Prefer: respond-async returns 202 and polls to a normal payload; annotation
    with no Prefer header returns 200 synchronously.

    Relabels the task table's "Mode" column "Recommended mode" and states the rule
    under the table, so the latency guidance stays without asserting a constraint
    the API never had.

    Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
    Signed-off-by: Alexander Boldakov alexboldakov@gmail.com

    • docs(genomic-intelligence): correct the request_id availability claim

    error.request_id is not always populated — 413 sync_too_large omits it from
    the body. The X-Request-Id header is set on every response, so read the
    header as a fallback.

    Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
    Signed-off-by: Alexander Boldakov alexboldakov@gmail.com

    • docs(genomic-intelligence): reconcile against the live contract, bump to 1.1

    Folds in corrections that existed only in our downstream staging copy, and
    re-verifies every claim against the live 2026.08.19.4 schema and API.

    • Splice: state that the wrong strand fails silently. It does not return
      zeros or an empty result -- measured live, a reverse-complemented sequence
      returns plausible sites at different positions, often at high confidence,
      so neither score nor count reveals the mistake. Any "empty means wrong
      strand" heuristic is unsafe.
    • Delivery mode: no usable templated /v1/tasks/{task}/predict fallback (any
      other task segment is 404, never 422); Prefer is declared on all six
      predict operations plus the composite; async is JSON-only.
    • max_seq_length_bp: legacy, ambiguous and being withdrawn. It reads 9,198
      for g0-expression -- the trained window, not a request cap -- so gating on
      it wrongly rejects the 9,198-500,000 bp range expression accepts.
    • Errors: treat error.details as display-only and accept either declared
      shape; prefer the X-Request-Id header for correlation, since the body
      field is absent on some error paths.
    • Drop a stale schema-version note claiming production might still serve
      2026.08.18.1, and note that a generated client must be regenerated.
    • Document the by-hand equivalent of the composite workflow.

    Validated: skills-ref validate passes; repo spec rules clean; tests/_meta
    10 passed / 1213 subtests. SKILL.md 362 lines, under the 500 limit.

    Signed-off-by: Alexander Boldakov alexboldakov@gmail.com

    • docs(genomic-intelligence): refresh contract prose against PROD 2026.08.19.5

    Today's GI ship landed after this text was written, so several claims went
    stale within hours:

    • 422 details is the declared {"errors": [...]} object, not a bare array.
      Defensive handling of either shape is kept; only the prose was wrong.
    • error.request_id is populated on every error path, including both 413
      variants; success envelopes carry meta.request_id.
    • bio_spec.max_seq_length_bp is retired and absent from the live response;
      request_max_bp is the cap.
    • Version notes hedging that PROD may still serve an older build are moot.
    • Sync/async is a per-request delivery choice, never a task property; the
      composite's 50,000 bp sync limit is the only forced case.

    Also renames the client's synthesized non_json error code to http_error,
    which is in the published 21-value enum; client-origin errors remain
    distinguishable by carrying no request_id.

    Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
    Signed-off-by: Alexander Boldakov alexboldakov@gmail.com

    • docs(genomic-intelligence): drop API-codebase references, normalize comments

    Audited against AUTHORING.md. Removes every pointer at the private service
    codebase (retired gpu_service/* paths, internal constants and symbols) and
    the internal release stamps that went with them, restating each as what the
    Genomic Intelligence API serves, with the published OpenAPI document as the
    authority. Also normalizes the research-use wording, removes pinned model IDs
    and prediction values from prose, and makes comment voice consistent.

    No contract facts changed; every bound, field and status code re-verified
    against the live schema.

    Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

    • docs(genomic-intelligence): stamp the verified contract version, mark loc tuples illustrative

    Addresses: https://github.com/K-Dense-AI/scientific-agent-skills/pull/228#pullrequestreview-4976574250

    The footer previously named an internal service build (2026.08.19.4), which a
    reader cannot resolve from the published contract. The last push removed it
    entirely, which was worse: the stamp is the only handle a reader has on which
    claims to re-verify, and nothing in that repo's CI can check our numbers. It is
    back, as the OpenAPI info.version this file was verified against.

    The loc tuples now say they are illustrative of the error shape and not part of
    the contract, rather than sitting two lines from the instruction not to branch
    on them.

    Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

    • genomic-intelligence: the submitted length is meta.sequence_length

    data.input.sequence_length was removed from the API at contract revision 13;
    the docs described it as the scored 9,198 bp.

    Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
    Claude-Session: https://claude.ai/code/session_01LA7HntiXoc7ZpQz8boGk6b


    Signed-off-by: Alexander Boldakov alexboldakov@gmail.com
    Co-authored-by: Claude Opus 5 noreply@anthropic.com

    下载附件