8000 feat: Enhanced lockfile with zero-LLM rebuilds · Issue #23 · Mnehmos/mnehmos.nls.lang · GitHub
[go: up one dir, main page]

Skip to content

feat: Enhanced lockfile with zero-LLM rebuilds #23

Closed

Description

@Mnehmos

Overview

Lockfile enables reproducible builds without LLM calls.

Current State

Basic lockfile exists with source/output hashes.

Enhancements

  • Store generated code inline (for zero-LLM rebuild)
  • Incremental compilation (only recompile changed ANLUs)
  • Lock file validation on compile
  • nlsc lock:check - Verify lock file is current
  • nlsc lock:update - Regenerate lock file

Lock File Format

anlus:
  validate-token:
    source_hash: sha256:abc...
    output_hash: sha256:def...
    output_lines: 23
    generated_code: |
      def validate_token(token: str, secret: str) -> User:
          ...

Exit Criteria

  • Rebuild from lockfile without any LLM calls
  • Lock file drift detected and reported

Activity

  1. Mnehmos commented on Jan 17, 2026

    @Mnehmos
    OwnerAuthor

    Implemented in commit f4749e8

    Summary

    Enhanced the lockfile system to support zero-LLM rebuilds and incremental compilation.

    New Features

    • Inline generated code: Each ANLU's generated code is now stored in the lockfile
    • Zero-LLM rebuilds: rebuild_from_lockfile() can reconstruct output without any LLM calls when sources haven't changed
    • Incremental detection: verify_lockfile() identifies which ANLUs have changed
    • CLI commands: Added nlsc lock:check and nlsc lock:update

    New Functions

    • extract_function_code() - Extract per-ANLU code from generated output
    • rebuild_from_lockfile() - Rebuild using cached code when possible
    • cmd_lock_check - Verify lockfile is current
    • cmd_lock_update - Regenerate lockfile

    Tests

    15 new tests covering enhanced lockfile functionality (now at 207 total tests).

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

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0