One player has Mechanized Production and more than eight creatures in play, but only four of them are Production copies of the enchanted creature. In an attempt to win the game, during his upkeep he puts the Production trigger on the stack and then casts Mirrorweave on one of the copies not enchanted with Mechanized Production. If an opponent destroys the creature enchanted with Production in response, does he still win? The ability refers to the "enchanted artifact" which there isn't one, does Production look back in time to see what it was attached to before it was destroyed?
The player will not get another token copy, but he will still win the game.
He won't get a copy, because at its last moment on the battlefield, the aura was not attached to anything. The opponent destroyed the creature it enchanted, leaving the aura unattached, and it was shortly thereafter sent to the graveyard as a state based action. However, the trigger has another instruction, and that one is still possible to carry out. Since the player still controls 8+ creatures, which are all turned into a copy of the artifact token by Mirrorweave (as are all other creatures currently on the battlefield), the trigger will still make him win the game.
If instead of destroying the creature, the opponent destroyed the aura, then the player would even get another token copy, becasue the aura was attached at its last moment on the battlefield.
Assuming Mechanized Production was attached to a permanent that's normally a nonlegendary artifact creature at the beginning of the scenario:
Mechanized Production's ability checks whether its controller "control[s] eight or more artifacts with the same name as one another" when it resolves (C.R. 608.2g, 109.5). Thus, that player can win the game if that condition holds even if it didn't hold at the beginning of the upkeep (that ability doesn't contain an intervening "if" clause, so C.R. 603.4 doesn't apply).
Note also that generally, if the enchanted artifact leaves the battlefield, Mechanized Production will go to the graveyard as a state-based action for not being attached to anything (C.R. 704.5m). Since it won't have been attached to anything when that happens, however, no token will be created, since the "enchanted artifact" will be undefined (C.R. 608.2g, 112.7a, 303.4k; see also C.R. 706.7a, which describes a similar situation). (Compare this to the case when Mechanized Production leaves the battlefield rather than, or simultaneously with, the enchanted artifact. In this case, a token can still be created even if Mechanized Production or that artifact isn't on the battlefield anymore, since Mechanized Production had a last-known "enchanted artifact" at the last moment it was on the battlefield [C.R. 112.7a, 303.4k, 608.2g].)
EDIT (Sep. 28): One rule was renumbered with Ixalan.
EDIT (Feb. 19, 2018): Add rule citations.
EDIT (Nov. 18, 2018; Nov. 20, 2018): Add rule citation.
He won't get a copy, because at its last moment on the battlefield, the aura was not attached to anything. The opponent destroyed the creature it enchanted, leaving the aura unattached, and it was shortly thereafter sent to the graveyard as a state based action. However, the trigger has another instruction, and that one is still possible to carry out. Since the player still controls 8+ creatures, which are all turned into a copy of the artifact token by Mirrorweave (as are all other creatures currently on the battlefield), the trigger will still make him win the game.
If instead of destroying the creature, the opponent destroyed the aura, then the player would even get another token copy, becasue the aura was attached at its last moment on the battlefield.
Former Rules Advisor
"Everything's better with pirates." - Lodge
(The Gamers: Dorkness Rising)
"Any sufficiently analyzed magic is indistinguishable from science."
(Girl Genius - Fairy Tale Theater Break - Cinderella, end of volume 8)
Mechanized Production's ability checks whether its controller "control[s] eight or more artifacts with the same name as one another" when it resolves (C.R. 608.2g, 109.5). Thus, that player can win the game if that condition holds even if it didn't hold at the beginning of the upkeep (that ability doesn't contain an intervening "if" clause, so C.R. 603.4 doesn't apply).
Note also that generally, if the enchanted artifact leaves the battlefield, Mechanized Production will go to the graveyard as a state-based action for not being attached to anything (C.R. 704.5m). Since it won't have been attached to anything when that happens, however, no token will be created, since the "enchanted artifact" will be undefined (C.R. 608.2g, 112.7a, 303.4k; see also C.R. 706.7a, which describes a similar situation). (Compare this to the case when Mechanized Production leaves the battlefield rather than, or simultaneously with, the enchanted artifact. In this case, a token can still be created even if Mechanized Production or that artifact isn't on the battlefield anymore, since Mechanized Production had a last-known "enchanted artifact" at the last moment it was on the battlefield [C.R. 112.7a, 303.4k, 608.2g].)
EDIT (Sep. 28): One rule was renumbered with Ixalan.
EDIT (Feb. 19, 2018): Add rule citations.
EDIT (Nov. 18, 2018; Nov. 20, 2018): Add rule citation.