> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-OWN-0008: Immutable bytes value is mutated by augmented assignment.

> Immutable bytes value is mutated by augmented assignment.

`SIFR-OWN-0008` belongs to the **Ownership and borrowing** diagnostic family. It means: immutable bytes value is mutated by augmented assignment.

## Why It Happens

The ownership model would be violated. Move values only once, keep borrows scoped, and cross task/channel/IPC boundaries only with owned values that satisfy the required safety traits.

<Info>
  Use `sifr --explain SIFR-OWN-0008` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Erroneous Code

```python theme={null}
def consume(own values: list[int]) -> int:
    return len(values)

items: list[int] = [1, 2]
taken: int = consume(items)
count: int = len(items)
```

## How To Fix It

Move ownership only after the last use, keep mutable borrows scoped, and send only owned sendable values across task or channel boundaries.

## Fixed Code

```python theme={null}
def consume(own values: list[int]) -> int:
    return len(values)

items: list[int] = [1, 2]
count: int = len(items)
taken: int = consume(items)
```

## Details

| Field                  | Value                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------- |
| Code                   | `SIFR-OWN-0008`                                                                    |
| Family                 | `OWN`                                                                              |
| Severity               | Error                                                                              |
| Stability              | stable                                                                             |
| Owner                  | `sifr_lowering::lower::aug_assign_lowering`                                        |
| Representative fixture | `crates/sifr/tests/e2e/fail/bytes_augmented_subscript_assignment_unsupported.sifr` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
