Skip to content

engine(focus-manifest): parseFocusManifest's "no recognized fields" fallback check ignores publicProof #10318

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

packages/loopover-engine/src/focus-manifest.ts's parseFocusManifest decides whether an entire
parsed manifest should be discarded as "no recognized focus fields" (lines ~4529-4550). The check is
a long conjunction of !manifest.X.present across every sub-config:

!manifest.gate.present &&
!manifest.review.present &&
!manifest.features.present &&
!manifest.experimental.present &&
!manifest.contentLane.present &&
!manifest.repoDocGeneration.present &&
!manifest.reviewRecap.present &&
!manifest.maintainerRecap.present &&
!manifest.ops.present &&
!manifest.publicStats.present &&
!manifest.fairnessAnalytics.present &&
!manifest.draftFlow.present &&
!manifest.upstreamDriftIssues.present &&
!manifest.sweepWatchdog.present &&
!manifest.prReconciliation.present &&
!manifest.activeReviewReconciliation.present &&
!manifest.loopEscalation.present &&
!manifest.federatedIntelligence.present

manifest.publicProof.present (the FocusManifestPublicProofConfig parsed by
parsePublicProofConfig, added under #9569, type declared at lines 505-508) is missing from this
list. parsePublicProofConfig (lines 2523-2532) sets present: true whenever record.publicProof
is a valid mapping object — including an empty one, {}. So a manifest whose ONLY configured field
is publicProof: {} (or publicProof: { enabled: true }) parses publicProof.present correctly as
true, but every OTHER sub-config's .present stays false (since nothing else was configured),
so the omitted check still evaluates the whole conjunction as true — the manifest is misclassified
as "no recognized focus fields," manifest.present is force-set to false, and the misleading
warning "Manifest contained no recognized focus fields; falling back to deterministic signals." is
emitted even though publicProof parsed correctly and is genuinely configured.

FocusManifestPublicProofConfig has real consumers (src/signals/focus-manifest-loader.ts,
src/review/proof-summary.ts), and src/signals/focus-manifest.ts is a pure re-export shim over
this exact function, so the bug reaches the hosted app, not just this package.
test/unit/focus-manifest.test.ts's publicProof describe block (lines 86-121) tests parsing and
round-tripping publicProof in isolation, but never tests the "manifest contains only
publicProof" aggregate fallback path.

Requirements

  • In packages/loopover-engine/src/focus-manifest.ts, add !manifest.publicProof.present to the
    conjunction that decides the "no recognized focus fields" fallback (the block around lines
    4529-4550), in the same style/position as the other sub-config checks (position within the list
    does not matter functionally, but keep it grouped with the other .present checks for
    readability).
  • Do not change any other condition in this check, and do not change parsePublicProofConfig or
    publicProofConfigToJson.

Deliverables

  • A manifest whose only configured top-level field is publicProof (e.g. { publicProof: { enabled: true } } or { publicProof: {} }) does NOT trigger the "Manifest contained no
    recognized focus fields" warning, and manifest.present is true.
  • A manifest with genuinely no recognized fields (e.g. {} or { someUnknownField: 1 }) still
    triggers the warning and manifest.present: false, unchanged from today.

Both Deliverables are required in this one PR — there is no narrower scope for this issue.

Test Coverage Requirements

packages/loopover-engine/src/** is measured by Codecov via two separate uploads whose hits are
unioned
— root test/** AND packages/loopover-engine/test/**. Add the regression test to
test/unit/focus-manifest.test.ts (root-level, alongside the existing publicProof manifest block (#9569) describe block at line 86), asserting both Deliverables above directly against
parseFocusManifest's return value (.present and .warnings). Target 100% branch coverage of the
corrected conjunction.

Expected Outcome

A manifest that configures only publicProof: is recognized as a genuinely-configured manifest, not
silently discarded with a misleading "no recognized fields" warning.

Links & Resources

  • packages/loopover-engine/src/focus-manifest.ts (lines 4511 parsePublicProofConfig call, lines
    ~4529-4550 the "no recognized fields" check, lines 2523-2532 parsePublicProofConfig, lines
    505-508 FocusManifestPublicProofConfig)
  • test/unit/focus-manifest.test.ts (lines 86-121, the existing publicProof test block)
  • src/signals/focus-manifest-loader.ts, src/review/proof-summary.ts (real consumers)
  • Original feature: Public proof page /proof/:owner/:repo + README badge — the shareable verification surface #9569
  • Milestone: Miner Wave 4.6 — AMS Hardening Round 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions