Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-luna· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION [BUG] apm install fail second time with Content hash mismatch Describe…

  1. User

    ISSUE DESCRIPTION

    [BUG] apm install fail second time with Content hash mismatch Describe the bug I can install my repo (see apm.yml further down) via apm install <org>/<repo>/package/<project> just fine (kinda, see the logs, it looks wonky but maybe it's just a new feature) but the second time I run apm install it will fail consistently with Content hash mismatch.

    To Reproduce Steps to reproduce the behavior:

    1. apm install <repo>
    2. apm install

    Expected behavior A clear and concise description of what you expected to happen.

    Environment (please complete the following information):

    • OS: Windows
    • APM Version: 0.16.0

    Logs

    > apm install --update --force
    [>] Installing dependencies from apm.yml...
    [>] Resolving github-copilot-agent-skills-testing...
    [i] Targets: copilot  (source: apm.yml)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/<project> #default @d479f42e
      |-- (files unchanged)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/myorg #default @d479f42e
      |-- (files unchanged)
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/instructions/testing.instructions.md #main
      |-- 1 instruction(s) integrated -> .github/instructions/
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/run-coverage #default @d479f42e
      |-- (files unchanged)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/update-from-template #default @d479f42e
      |-- (files unchanged)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/csharp #default @d479f42e
      |-- (files unchanged)
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/instructions/code-style.instructions.md #main
      |-- 1 instruction(s) integrated -> .github/instructions/
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/instructions/protect-prefixed-agent-files.instructions.md
    #main
      |-- 1 instruction(s) integrated -> .github/instructions/
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/git-conventions #default @d479f42e
      |-- (files unchanged)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/update-nuget-packages #default @d479f42e
      |-- (files unchanged)
    Partial clone (--filter=blob:none) failed for https://dev.azure.com/<org>/tools; retrying with full bare clone. Server may not
    support filter v2.
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/write-tests #default @d479f42e
      |-- (files unchanged)
    cache-pin: remote dep '<org>/tools/github-copilot-agent-skills' has no resolved_commit; drift cannot verify its cache freshness.
    Re-run 'apm install' with a pinned ref (commit, tag, or specific branch HEAD).
    cache-pin: remote dep '<org>/tools/github-copilot-agent-skills' has no resolved_commit; drift cannot verify its cache freshness.
    Re-run 'apm install' with a pinned ref (commit, tag, or specific branch HEAD).
    cache-pin: remote dep '<org>/tools/github-copilot-agent-skills' has no resolved_commit; drift cannot verify its cache freshness.
    Re-run 'apm install' with a pinned ref (commit, tag, or specific branch HEAD).
    [i] Trusting direct dependency MCP 'MyOrg.CLI' from '<project>-skills'
    [i] Trusting direct dependency MCP 'NuGet' from '<project>-skills'
    [i] Trusting direct dependency MCP 'Github' from '<project>-skills'
    [i] Trusting direct dependency MCP 'MyOrg.CLI' from 'skills'
    [i] Trusting direct dependency MCP 'NuGet' from 'skills'
    +- MCP Servers (3)
    |  [+] MyOrg.CLI (already configured)
    |  [+] NuGet (already configured)
    |  [+] Github (already configured)
    [*] All servers up to date
      [!] 11 dependencies unpinned: <org>/tools/github-copilot-agent-skills -- add #tag or #sha to prevent drift
      [!] Transitive package 'csharp-skills' declares self-defined MCP server 'NuGet' (registry: false). Re-declare it in your apm.yml or
    use --trust-transitive-mcp.
      [!] Transitive package 'csharp-skills' declares self-defined MCP server 'Github' (registry: false). Re-declare it in your apm.yml
    or use --trust-transitive-mcp.
    [*] Installed 11 APM dependencies in 87.9s.
    
    
    > apm install
    [>] Installing dependencies from apm.yml...
    [i] Targets: copilot  (source: apm.yml)
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/<project> @d479f42e (cached)
      |-- (files unchanged)
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/myorg @d479f42e (cached)
      |-- (files unchanged)
      [+] dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/instructions/testing.instructions.md #main
    Content hash mismatch for <org>/tools/github-copilot-agent-skills/.apm/instructions/testing.instructions.md: expected
    sha256:2227579674ab30b5b59f703ac152fa74ac2912d724d04aeffbf3914cac2e6b88, got
    sha256:b82d09e4e7879eeb0e90cc7dfeebdac45de6ebdbcdda7824b40438196692f8f8. The downloaded content differs from the lockfile record.
    This may indicate a supply-chain attack. Use 'apm install --update' to accept new content and update the lockfile.
    [!] Install interrupted after 7.7s.
    

    Additional context apm.yml

    name: <project>-skills
    version: 1.0.0
    description: '<Project> skills and agent for GitHub Copilot.'
    author: Oskar Klintrot
    target: vscode
    dependencies:
      apm:
      - dev.azure.com/<org>/tools/github-copilot-agent-skills/packages/csharp
      - dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/skills/run-coverage
      - dev.azure.com/<org>/tools/github-copilot-agent-skills/.apm/instructions/testing.instructions.md
      mcp:
      - name: NuGet
        registry: false
        transport: stdio
        command: dnx
        args:
        - NuGet.Mcp.Server
        - --source
        - https://api.nuget.org/v3/index.json
        - --yes
    

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /apm, current file: none) bash-$

  2. Assistant

    I’ll trace the install/cache and lockfile content-hash paths, identify why a cached instruction is reconstructed differently on the second run, then add a focused fix without changing tests. I’ll inspect repository structure and run the relevant test suite or a temporary reproduction.

  3. Assistant

    The repository is Python-based. I’m narrowing the investigation to the code that computes lockfile hashes, reads cached remote files, and materializes instruction files, since the first run records one byte representation while the second run appears to hash another.

  4. Assistant

    The failing dependency is a virtual single-file package. Its package directory contains a generated apm.yml, and that generated file is written with platform-default newline translation. This makes the package-tree hash depend on how the package was materialized (notably Windows versus cache/fresh paths), even though the downloaded instruction bytes are unchanged. I’ll make generated virtual manifests explicitly UTF-8/LF, including the analogous collection path, then run the focused downloader and hash tests.

  5. Assistant

    The focused test invocation initially failed only because the source package is not installed in the shell environment (ModuleNotFoundError), not because of the change. I’ll rerun with the repository’s src path enabled and add a direct cross-platform newline check to verify the generated manifest is byte-stable.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.