ruvnet/ruflo · error · Error

Section "${id}" not found

Error message

Section "${id}" not found

What it means

Thrown by RvfaReader.extractSection when no entry in the parsed header.sections array has an id matching the request. The section table is whatever the RVFA manifest declares, and ids are matched exactly and case-sensitively.

Source

Thrown at v3/@claude-flow/cli/src/appliance/rvfa-format.ts:412

  getHeader(): RvfaHeader {
    return this.header;
  }

  /** List all sections declared in the header. */
  getSections(): RvfaSection[] {
    return this.header.sections;
  }

  /**
   * Extract and decompress a section by its id.
   *
   * @param id  The section identifier (e.g. 'kernel', 'runtime').
   * @returns   The decompressed section payload.
   */
  extractSection(id: string): Buffer {
    const sec = this.header.sections.find((s) => s.id === id);
    if (!sec) {
      throw new Error(`Section "${id}" not found`);
    }

    if (sec.offset + sec.size > this.buf.length - SHA256_SIZE) {
      throw new Error(`Section "${id}" exceeds buffer bounds`);
    }

    const raw = this.buf.subarray(sec.offset, sec.offset + sec.size);

    if (sec.compression === 'gzip') {
      return gunzipSync(raw);
    }
    if (sec.compression === 'zstd') {
      // zstd not natively supported — attempt gzip fallback (mirrors writer)
      try {
        return gunzipSync(raw);
      } catch {
        throw new Error(
          'zstd decompression is not supported in this environment',

View on GitHub (pinned to 6b01dc5a68)

Solutions

  1. Enumerate available ids first: reader.getSections().map(s => s.id).
  2. Use the exact id string as written by the producer.
  3. Fall back to a clear user-facing error listing the available ids.

Example fix

// before
const kernel = reader.extractSection('Kernel');

// after
const ids = reader.getSections().map(s => s.id);
if (!ids.includes('kernel')) {
  throw new Error(`No 'kernel' section; available: ${ids.join(', ')}`);
}
const kernel = reader.extractSection('kernel');
Defensive patterns

Strategy: validation

Validate before calling

const ids = reader.getSections().map(s => s.id);
if (!ids.includes(id)) {
  throw new Error(`Unknown section "${id}"; available: ${ids.join(', ')}`);
}
const payload = reader.extractSection(id);

Type guard

function sectionExists(reader: RvfaReader, id: string): boolean {
  return reader.getSections().some(s => s.id === id);
}

Prevention

When it happens

Trigger: Calling reader.extractSection(id) with an id absent from the manifest, e.g. extractSection('runtime') when the manifest declares 'rt', or a casing mistake like 'Kernel' vs 'kernel'.

Common situations: Hardcoded section name that drifts from the writer's manifest; an RVFA build that omits the section; case mismatch; typo.

Related errors


AI-assisted analysis of ruvnet/ruflo@6b01dc5a68 (2026-08-12). Data as JSON: /api/errors/79d92d92c396261f. Report an issue: GitHub.